haju__log
[python][백준/BOJ] 1789번 : 수들의 합 본문
https://www.acmicpc.net/problem/1789
1789번: 수들의 합
첫째 줄에 자연수 S(1 ≤ S ≤ 4,294,967,295)가 주어진다.
www.acmicpc.net
s=int(input())
cnt=0
i=1
while 1:
cnt = cnt + i
if cnt>s:
break
i = i + 1
print(i-1)'BOJ_백준' 카테고리의 다른 글
| [python][백준/BOJ] 10214번 : Baseball (0) | 2023.03.05 |
|---|---|
| [python][백준/BOJ] 11557번 : Yangjojang of The Year (0) | 2023.03.05 |
| [python][백준/BOJ] 10039번 : 평균 점수 (0) | 2023.03.05 |
| [python][백준/BOJ] 2914번 : 저작권 (0) | 2023.03.05 |
| [python][백준/BOJ] 3046번 : R2 (0) | 2023.03.05 |