반응형
문제 설명
https://www.acmicpc.net/problem/30306

제출한 코드
num = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
anum = 0
bnum = 0
for i in range(num) :
for j in range(num) :
if a[j]<b[i] :
anum += 1
elif a[j]>b[i] :
bnum += 1
if anum > bnum :
print("second")
elif bnum > anum :
print("first")
else :
print("tie")
결과

후기
반응형
'BQJ 백준 > python' 카테고리의 다른 글
[Python/파이썬] 백준 1546번: 평균 (0) | 2024.06.14 |
---|---|
[Python/파이썬] 백준 10675번: Cow Routing (0) | 2024.06.14 |
[Python/파이썬] 백준 1330번: 두 수 비교하기 (0) | 2024.06.12 |
[Python/파이썬] 백준 1316번: 그룹 단어 체커 (0) | 2024.06.11 |
[Python/파이썬] 백준 1271번: 엄청난 부자2 (0) | 2024.06.11 |