Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. for _ in xrange(int(raw_input())):
  2. health, armor = map(int, raw_input().split())
  3. ans = 0
  4. while True:
  5. health += 3
  6. armor += 2
  7. ans += 1
  8. if health > 5 and armor > 10:
  9. health -= 5
  10. armor -= 10
  11. ans += 1
  12. elif health > 20:
  13. health -= 20
  14. armor += 5
  15. ans += 1
  16. else:
  17. break
  18. print ans
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement