Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- twonum = input().split()
- socks = int(twonum[0])
- newsocks = int(twonum[1])
- days = 0
- while socks > 0:
- socks -= 1
- if newsocks > 1:
- newsocks -= 1
- elif newsocks == 1:
- socks += 1
- newsocks = int(twonum[1])
- days += 1
- print(days)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement