here is the link to my code http://www.codechef.com/viewsolution/1641046 …
i dnt know y it is giving WA …
can anybody plz give me the test cases for which my code is giving wrong ans…
plz do reply!!
finally I found it
your program return 1 for
1
1234567890 1234567980
but there are 3 delicious numbers here - 1234567890, 1234567908 and 1234567980
1 Like
thanx a lot bro…i rectified it but its still giving WA …here is my rectified code http://www.codechef.com/viewsolution/1648113
and one more question…is it right to say that “any number having more than than 10 digits has 8877690 delicious numbers” ??
According to pigeonhole principle it’s clear that there is no delicious number equal or greater than 10^11, so you are correct, but your code says for
1
9876543210 1000000000000000
that there are 3192001 delicious numbers, but 9876543210 is the last one - http://ideone.com/5Udefk