I got ONEZERO accepted but with very poor timelimit = 7s

many top coders have solved it in <1s , so it seems they probably use faster algo rather

than just faster I/O.

the algorithm which I used is quite crude

find remainders of 10^n using modular exponentiation

and just check all sums of remainders , we get solution when sum is divisble by n .

does anybody know a better algo for this problem.

Thanx ,