Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _ in xrange(int(raw_input())):
- health, armor = map(int, raw_input().split())
- ans = 0
- while True:
- health += 3
- armor += 2
- ans += 1
- if health > 5 and armor > 10:
- health -= 5
- armor -= 10
- ans += 1
- elif health > 20:
- health -= 20
- armor += 5
- ans += 1
- else:
- break
- print ans
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement