-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLADDU.py
22 lines (22 loc) · 822 Bytes
/
LADDU.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
t = int(input())
for _ in range(t):
laddu = 0
activities, origin = map(str, input().split())
for _ in range(int(activities)):
activityInput = input()
if activityInput == 'TOP_CONTRIBUTOR':
laddu += 300
if activityInput == 'CONTEST_HOSTED':
laddu += 50
if activityInput.split()[0] == 'CONTEST_WON':
if 1 <= int(activityInput.split()[1]) <= 20:
laddu += (320 - int(activityInput.split()[1]))
else:
laddu += 300
if activityInput.split()[0] == 'BUG_FOUND' and 50 <= int(activityInput.split()[1]) <= 1000:
laddu += int(activityInput.split()[1])
if (origin == 'INDIAN'):
numberOfMonth = laddu // 200
else:
numberOfMonth = laddu // 400
print(numberOfMonth)