b2stts2b's blog

By b2stts2b, history, 4 years ago, In English

Hi! I don't understand why I'm getting exit code 1.

Here is the submission: https://codeforces.com/contest/977/submission/74823472

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it
nums = input().split(" ")
  for i in range(int(nums[1])):
      if (int(nums[0]) % 10 == 0):
          nums[0] = nums[0] // 10
      else:
          nums[0] -= 1
print(nums[0])

you are trying to subtract 1 from a string on line 6