1. 오케이
2. 간단하게 풀 수 있는 문제
3. M, MH
#include <stdio.h>
int n;
int main(void)
{
freopen("input.txt", "r", stdin);
int i, j, cnt = 0;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
long long temp;
scanf("%lld", &temp);
temp /= 100;
if (temp == 0) {
printf("#%d 0\n", i + 1);
}
else if (1 <= temp && temp < 10)
{
printf("#%d 1\n", i + 1);
}
else if (10 <= temp && temp < 100)
{
printf("#%d 2\n", i + 1);
}
else if (100 <= temp && temp < 1000)
{
printf("#%d 3\n", i + 1);
}
else if (1000 <= temp && temp < 10000)
{
printf("#%d 4\n", i + 1);
}
else
{
printf("#%d 5\n", i + 1);
}
}
return 0;
}'Algorithms > simulation' 카테고리의 다른 글
| 추억의 2048 게임 (0) | 2019.01.30 |
|---|---|
| 다솔이의 월급 상자 (0) | 2019.01.30 |
| 장애물 경주 난이도 (0) | 2019.01.30 |
| 천사의 계단 (0) | 2019.01.29 |
| 작업순서 (0) | 2019.01.29 |
댓글