Hacker News new | ask | show | jobs
by contingencies 2114 days ago
Can I multiply a number by itself. This is a great clarifying question.

Not for a total of 220!

1 comments

Who said that the inputs where integers? :)
Funny how everyone here, myself included, assumed the numbers were integers!

I like the follow up question of "what if they are floats?" to see if the interviewee knows not to use `==` with floats.

220 = 2 * 2 * 5 * 11. There must be 2 * sqrt(5) * sqrt(11) in that list of numbers. It's about 14.8323969742. Easy to test for it.