-Code
n = int(input())
k = int(input())
li = list(map(int, input().split()))
li_res = [el ** k for el in li]
total = 0
for el in li_res:
if el > 0:
total += el
print(total)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 24867번 Два станка (0) | 2025.04.09 |
---|---|
[백준/파이썬] 22123번 Экзамен (0) | 2025.04.08 |
[백준/파이썬] 32449번 Animal Farm (0) | 2025.04.06 |
[백준/파이썬] 25786번 Decimal XOR (0) | 2025.04.05 |
[백준/파이썬] 33753번 주차 요금 정산하기 (0) | 2025.04.04 |