본문 바로가기
python-algorithm

[백준] 3058

by 무적김두칠 2020. 12. 23.

1
2
3
4
5
6
7
8
9
import sys
n=int(sys.stdin.readline())
for _ in range(n):
    tmp=list(map(int, sys.stdin.readline().split()))
    ans=0
    oddtmp=[]
    for i in range(7):
       if tmp[i]%2==0: ans+=tmp[i]; oddtmp.append(tmp[i])
    print("%d %d"%(ans,min(oddtmp)))
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 3486  (0) 2020.12.23
[백준] 3460  (0) 2020.12.23
[백준] 3028  (0) 2020.12.23
[백준] 3009  (0) 2020.12.22
[백준] 2991  (0) 2020.12.22

댓글