https://www.acmicpc.net/problem/25893
25893번: Majestic 10
The movie “Magnificent 7” has become a western classic. Well, this year we have 10 coaches training the UCF programming teams and once you meet them, you’ll realize why they are called the “Majestic 10”! The number 10 is actually special in many
www.acmicpc.net
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
def sol(nums):
triple_cnt = 0
for i in nums:
if i>=10:
triple_cnt +=1
if triple_cnt ==3:
return 'triple-double'
elif triple_cnt ==2:
return 'double-double'
elif triple_cnt ==1:
return 'double'
else:
return 'zilch'
if __name__ == '__main__':
n = int(input())
for _ in range(n):
nums = list(map(int,input().split()))
print(*nums)
print(sol(nums))
if _ != n-1:
print()
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 25600 Triathlon (0) | 2022.11.29 |
---|---|
백준 25881 Electric Bill (0) | 2022.11.29 |
백준 25858 Divide the Cash (0) | 2022.11.29 |
백준 25991 Lots of Liquid (0) | 2022.11.29 |
백준 26068 치킨댄스를 추는 곰곰이를 본 임스 2 (0) | 2022.11.29 |
댓글