Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- student_count = int(input())
- lecture_count = int(input())
- initial_bonus = int(input())
- max_bonus = 0
- max_lectures = 0
- for i in range(student_count):
- lectures_attended = int(input())
- total_bonus = (lectures_attended / lecture_count) * (5 + initial_bonus)
- if total_bonus >= max_bonus:
- max_bonus = total_bonus
- max_lectures = lectures_attended
- else:
- print(f'Max Bonus: {math.ceil(max_bonus)}.')
- print(f'The student has attended {max_lectures} lectures.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement