-Code
x = int(input())
s = int(input())
p = int(input())
res = x if s == 1 else 0
if p == 1:
t = 1 if s == 1 else x
for _ in range(t):
res += int(input())
print(res)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 6243번 Mileage Bank (0) | 2025.03.13 |
---|---|
[백준/파이썬] 9924번 The Euclidean Algorithm (0) | 2025.03.12 |
[백준/파이썬] 29657번 Стандарты времени (0) | 2025.03.10 |
[백준/파이썬] 33135번 Append and Panic! (0) | 2025.03.09 |
[백준/파이썬] 21875번 Innohorse (0) | 2025.03.08 |