I know we can say 'The apples cost me 50 dollars. ' But is it idiomatic to say 'It cost me 50 dollars to buy the apples'?