Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- special_materials = {
- "shards": 0,
- "fragments": 0,
- "motes": 0
- }
- junk_materials = {}
- flag = False
- while not flag:
- line = input()
- materials = line.split()
- for i in range(0, len(materials), 2):
- quantity = int(materials[i])
- material = materials[i + 1].lower()
- if material in special_materials:
- special_materials[material] += quantity
- if special_materials[material] >= 250:
- special_materials[material] -= 250
- flag = True
- if material == "shards":
- print(f"Shadowmourne obtained!")
- if material == "fragments":
- print(f"Valanyr obtained!")
- if material == "motes":
- print(f"Dragonwrath obtained!")
- break
- else:
- if material in junk_materials:
- junk_materials[material] += quantity
- else:
- junk_materials[material] = quantity
- for material, count in special_materials.items():
- print(f"{material}: {count}")
- for material, count in junk_materials.items():
- print(f"{material}: {count}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement