Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- if n < 3 or n == 5:
- print('IMPOSIBLE')
- elif n % 3 == 0:
- print(int(n/3))
- print(0)
- elif n % 4 == 0:
- print(0)
- print(int(n/4))
- else:
- x = int(n/3)
- y = 0
- while x > 0:
- if x*3+y*4 < n:
- y = y + 1
- elif x*3+y*4 > n:
- x = x - 1
- else:
- print(x)
- print(y)
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement