Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- transaction = input()
- while transaction:
- if transaction == '0 W 0':
- break
- transaction = transaction.split(' ')
- if transaction[1] == 'W':
- money = int(transaction[0]) - int(transaction[2])
- else:
- money = int(transaction[0]) + int(transaction[2])
- if money < -200:
- print('Not allowed')
- else:
- print(money)
- transaction = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement