DIGROT WA HELP

Problem Code:http://www.codechef.com/problems/DIGROT/.
sum 1 plz help…heres my solution …seem’s to be working for all test cases,but still showing wrong answer…http://www.codechef.com/viewsolution/4102672

1 Like

sorry i gave the wrong link.this is my corrected solution link which is also giving wrong answer.http://www.codechef.com/viewsolution/4102841

@prem_93 I am sorry with the cases I have given. I understood the question wrong.

Your approach is correct. But what’s going wrong is with your I/O. Your code gives different answers for same inputs…
Check these codes… link1 and link2

See what’s happening to those with the cases in second link with the same in first link.

1 Like

the answers must be 9100,910,990010 right?

oh!!!that was an initialization mistake…no problem in I/O…bug found…solution accepted…still pondering over the weird way in which my program behaved due to an initialization mistake…and thanks for that find.

1 Like