Advertisement
Spocoman

01. Bonus Scoring System

Nov 3rd, 2023
633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. from math import ceil
  2.  
  3. students = int(input())
  4. lectures = int(input())
  5. bonus = int(input())
  6. attendances = []
  7. max_bonus = 0
  8.  
  9. for i in range(students):
  10.     attendances.append(int(input()))
  11.  
  12. print(f"Max Bonus: {ceil(max(attendances) / lectures * (5 + bonus)) if lectures > 0 else 0}.\n"
  13.       f"The student has attended {max(attendances) if len(attendances) > 0 else 0} lectures.")
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement