Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- juniors = int(input())
- seniors = int(input())
- trace = input()
- if trace == "trail":
- juniors *= 5.5
- seniors *= 7
- elif trace == "cross-country":
- if juniors + seniors >= 50:
- juniors *= 8 * 0.75
- seniors *= 9.50 * 0.75
- else:
- juniors *= 8
- seniors *= 9.50
- elif trace == "downhill":
- juniors *= 12.25
- seniors *= 13.75
- else:
- juniors *= 20
- seniors *= 21.5
- total = (juniors + seniors) * 0.95
- total1 = int(total)
- total2 = total % 1
- if len(str(total2)) >= 5:
- if str(total2)[4] == "5":
- total2 += 0.001
- print(f"{total1 + total2:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement