본문 바로가기
python-algorithm

백준 14782 Bedtime Reading, I

by 무적김두칠 2021. 11. 19.

1
2
3
4
5
6
def divisiors(num):
    ans=0
    for i in range(1,num+1):
        if num%i==0: ans+=i
    print(ans)
divisiors(int(input()))
cs
반응형

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

백준 6679 싱기한 네자리 숫자  (0) 2021.11.19
백준 2858 기숙사 바닥  (0) 2021.11.19
백준 13225 Divisors  (0) 2021.11.19
백준 9288 More Dice  (0) 2021.11.19
백준 6975 Deficient, Perfect, and Abundant  (0) 2021.11.12

댓글