fork(1) download
  1. import random
  2. head=int(input())
  3. for i in range (1,5):
  4. count=random.randrange(10)
  5. head -= count
  6. if (head<=count):
  7. print("Dead")
  8. else:
  9. print("Живий. Залищилось ",head,"голів")
  10.  
Success #stdin #stdout 0.03s 11636KB
stdin
6
stdout
Живий. Залищилось  4 голів
Dead
Dead
Dead