Can you help me in finding the bug : Buggy Calculator

https://www.codechef.com/viewsolution/15982506 I followed a different approach than others.

There should be not leading zeros in the result. Your solution would fail for:

1 
555 500

either convert the result to int

print(int(tmep))

or

remove the leading 0s.

2 Likes

Thank you :slight_smile:

remove leading zeros ‘0’ or if all value is zero the print only one zero ‘0’ if got the same problem

2

54 54

55 55

output

8

0

my code link https://www.codechef.com/viewsolution/15987621