i have tried this problem and it is getting exactly same output as in sample output. but one test case is showing run time error. can you tell me what is wrong in the code ?
Broken calculator test case
your code throws runtime error for cases with n >= 254