You are viewing a single comment's thread. Return to all comments →
try adding 0 before %2d , that is , do %0d in your printf statement.
I think its an issue with the version of C I am using or the compiler. The code executes fine when submitted through Hackerrank. However, on my own machine, it seems that SS is stored as 00 if scanf contains %d%s for the last input. It works fine if you get rid of the string. Strange.
Actually , my code has a small mistake which I corrected and now it has passed all the testcases.