I thought the answer should be 0, as both numerator and denominator were squared, and for f(x) = 0, the value would be 0.

To those who could solve, what have I misunderstood?

I thought the answer should be 0, as both numerator and denominator were squared, and for f(x) = 0, the value would be 0.

To those who could solve, what have I misunderstood?

I cannot commentâ€¦and I cannot find discuss thread for IEMATICSâ€¦So I will write hereâ€¦

Sorry if it is unrelatedâ€¦

Can you tell me how you solved Problem 2 â€¦I tried brute force but it didnt help meâ€¦

Any help will be appreciatedâ€¦

1 Like

@spam_123 - You can generate all the numbers whose sum is 100 by backtracking and then check for the 2*n condition.

The code executed within 5 seconds!

The basic idea was to minimise number of digits first, so for sum to be 100, smallest number would be 19999â€¦

Now, doubling a given digit 1->2 2->4 â€¦ 4->8. 5->10 which is equal to 1, 6->3 â€¦ 9->9

So keeping in mind these two things, we need doubled number to have sum 10 more. Now doubling increases sum of digits only for digits smaller than 4.

At the end to increase by 10 we can have 244 which gives 488, whose sum is 10 more than the sum of 244. Rest of the digits can be filled by 9

So answer would be 2449999999999

You can solve the question without writing any code. Refer to my comment in the post of @spam_123

1 Like

0/0 is not 0

1 Like

Now i look really stupid. Thanks

1 Like

Welcome