본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#272 백준 파이썬 [3058] 짝수를 찾아라

https://www.acmicpc.net/problem/3058

 

Python Code

T = int(input())

for _ in range(T):
    input_numbers = list(map(int, input().split()))
    even_numbers = []
    
    for i in input_numbers:
        if i % 2 == 0:
            even_numbers.append(i) 
    
    print(sum(even_numbers), min(even_numbers))