본문 바로가기
python-algorithm

백준 26545 Mathematics

by 무적김두칠 2022. 12. 19.

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

 

26545번: Mathematics

A mathematician has stolen your calculator! Luckily, you know how to code and can write a program that adds together numbers. Write a program that adds together a list of integers.

www.acmicpc.net

 

1
2
3
4
5
6
if __name__ == '__main__':
    n = int(input())
    ans = 0
    for _ in range(n):
        ans += int(input())
    print(ans)
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 21591 Laptop Sticker  (1) 2022.12.20
백준 15232 Rectangles  (0) 2022.12.20
백준 26574 Copier  (0) 2022.12.19
백준 10189 Hook  (0) 2022.12.19
백준 6840 Who is in the middle?  (0) 2022.12.17

댓글