https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QSEhaA5sDFAUq
SW Expert Academy
SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!
swexpertacademy.com
테스트케이스가 주어지고
주어진 숫자들 중, 홀수만 찾아 더하여 출력하는 문제이다.
t = int(input())
for tc in range(1,t+1):
arr = list(map(int,input().split()))
result = 0
for i in range(10):
if arr[i]%2 ==1:
result+=arr[i]
print(f'#{tc} {result}')
'Algorithm > swea' 카테고리의 다른 글
[파이썬]swea 15230: 알파벳 공부 (0) | 2023.01.30 |
---|---|
[파이썬]swea 1926: 간단한 369게임 (0) | 2023.01.29 |
[파이썬]swea 1859: 백만 장자 프로젝트 (0) | 2023.01.28 |
[파이썬] swea 15612: 체스판 위의 룩 배치 (0) | 2023.01.18 |
swea 1865. 동철이의 일 분배 (0) | 2022.06.03 |
댓글