Skip to content

Commit 9b584c1

Browse files
authored
Solution
1 parent 1ba2ddc commit 9b584c1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/python3
2+
3+
import os
4+
import sys
5+
6+
def gradingStudents(grades):
7+
for i in range(len(grades)):
8+
if(grades[i]>37):
9+
if((grades[i]%5)!=0):
10+
if(5-(grades[i]%5)<3):
11+
grades[i]+=5-(grades[i]%5)
12+
return (grades)
13+
14+
if __name__ == '__main__':
15+
f = open(os.environ['OUTPUT_PATH'], 'w')
16+
17+
n = int(input())
18+
19+
grades = []
20+
21+
for _ in range(n):
22+
grades_item = int(input())
23+
grades.append(grades_item)
24+
25+
result = gradingStudents(grades)
26+
27+
f.write('\n'.join(map(str, result)))
28+
f.write('\n')
29+
30+
f.close()

0 commit comments

Comments
 (0)