The link of problem is:
https://hack.codingblocks.com/contests/c/255/67
The link of my code is:
http://ide.codingblocks.com/#/s/16566
My code is failing in one of the test case.
The link of problem is:
https://hack.codingblocks.com/contests/c/255/67
The link of my code is:
http://ide.codingblocks.com/#/s/16566
My code is failing in one of the test case.
Heyy ! you have to take care of 0 as well . ur code is giving 0 for input 0 which is wrong , so just need to take care of this case separately…
For 0 as input, 5 is the answer.
so if 000038480,the answer should be 555538485.
Am I right?
If it is so, give me some hint?
as input must be an integer, any no should start with an integeral value other than 0 except for the case 0
chech number digit by digit and if you get 0 then convert it to 5 and then and multiply by ths place value to make the sum. first try yourself but if you need some help refer this but try yourself first.
https://ide.codingblocks.com/#/s/16584
According to your code, for 0 as input it’s giving 0 instead of 5.