-Code
numbers = list(map(int, input()))
for i in range(16):
if i % 2 == 0:
change = numbers[i] * 2
if change >= 10:
change = change // 10 + change % 10
numbers[i] = change
print("DA" if not sum(numbers) % 10 else "NE")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 29064번 Обучение войск (0) | 2023.12.15 |
---|---|
[백준/파이썬] 30655번 Pique Esconde (0) | 2023.12.14 |
[백준/파이썬] 30889번 좌석 배치도 (0) | 2023.12.11 |
[백준/파이썬] 30596번 Axis-Aligned Area (0) | 2023.12.10 |
[백준/파이썬] 29684번 Which Team Should Receive the Sponsor Prize? (0) | 2023.12.09 |