- 0of 0 votes
Given an input n, find the smallest number x such that x % n = 0 and sum of the digits in x is equal to n.- mohit September 22, 2014 in India
Note: x is so large even long long int can't keep it.
It is obvious that find the sum of digits using (x/10) gives timeout, so how can its complexity be reduced.
| Report Duplicate | Flag | PURGE
Interview Type: Written Test
Open Chat in New Window