Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tournament_number = int(input())
- points = int(input())
- tournament_points = 0
- win = 0
- for i in range(tournament_number):
- tournament = input()
- if tournament == 'W':
- tournament_points += 2000
- win += 1
- elif tournament == 'F':
- tournament_points += 1200
- elif tournament == 'SF':
- tournament_points += 720
- print(f'Final points: {points + tournament_points}')
- print(f'Average points: {int(tournament_points / tournament_number)}')
- print(f'{win / tournament_number * 100:.2f}%')
- Фундаменталс решение:
- tournament_number = int(input())
- points = int(input())
- tournament_points = 0
- win = 0
- for i in range(tournament_number):
- tournament = input()
- tournament_points += {'W': 2000, 'F': 1200, 'SF': 720}[tournament]
- if tournament == 'W':
- win += 1
- print(f'Final points: {points + tournament_points}\n'
- f'Average points: {int(tournament_points / tournament_number)}\n'
- f'{win / tournament_number * 100:.2f}%')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement