fork download
  1. coins = int(input("Enter the total gold coins: "))
  2. mythic = int(input("Enter the price of a Mythic Chest: "))
  3. epic = int(input("Enter the price of an Epic Chest: "))
  4. rare = int(input("Enter the price of a Rare Chest: "))
  5.  
  6. mythic_chest = coins // mythic
  7. coins = coins % mythic
  8.  
  9. epic_chest = coins // epic
  10. coins = coins % epic
  11.  
  12. rare_chest = coins // rare
  13. coins = coins % rare
  14.  
  15. total_value = (mythic_chest * mythic) + (epic_chest * epic) + (rare_chest * rare)
  16.  
  17. print("Mythic Chests:", mythic_chest)
  18. print("Epic Chests:", rare_chest)
  19. print("Rare Chests:", rare_chest)
  20. print("Leftover gold coins:", coins)
  21. print("Total value of coins in chest:", total_value)
Success #stdin #stdout 0.1s 14132KB
stdin
734
250
80
15
stdout
Enter the total gold coins: Enter the price of a Mythic Chest: Enter the price of an Epic Chest: Enter the price of a Rare Chest: Mythic Chests: 2
Epic Chests: 4
Rare Chests: 4
Leftover gold coins: 14
Total value of coins in chest: 720