일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 정답
- general skills
- cryptography
- picoCTF
- picoCTF2018
- Smashing The Stack For Fun And Profit
- #hacking
- 버퍼오버플로우
- reversing
- 시스템
- grep
- forensics
- 해킹 공부
- dreamhack
- Aleph One
- Hxd
- CTF
- write up
- WEB
- 리버싱
- 스택
- writeup
- KOISTUDY
- 해설
- 번역
- Protostar
- #picoCTF2018
- 리눅스
- 시스템해킹
- 카이사르
Archives
- Today
- Total
Security || AI
[백준(BOJ)] 1110번: 더하기 사이클 본문
#include <stdio.h>
int main()
{
int N, temp, cnt = 0;
scanf("%d", &N);
int input = N;
while(1)
{
temp = (N >= 10)?(int)N/10:0;
temp += N%10;
N = (N%10)*10+temp%10;
cnt++;
if(input == N)
break;
}
printf("%d", cnt);
}
반응형
'Programming > 백준(BOJ)' 카테고리의 다른 글
[백준(BOJ)] 10872번: 팩토리얼 (0) | 2021.02.13 |
---|