# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
146103 | 2019-08-22T06:51:24 Z | Gumsoo Park(#3566) | 천사의 모래시계 (FXCUP3_hourglass) | C++17 | 2 ms | 376 KB |
#include<stdio.h> int N, dy[5000]; int main(){ scanf("%d", &N); dy[0]=0; for(int i=1; i<=20; i++){ dy[i]=9999; if(i>=3 && dy[i]>dy[i-3]+1) dy[i]=dy[i-3]+1; if(i>=5 && dy[i]>dy[i-5]+1) dy[i]=dy[i-5]+1; } dy[7]=4; printf("%d\n", dy[N]==9999 ? -1 : dy[N]); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Incorrect | 2 ms | 256 KB | Output isn't correct |
3 | Incorrect | 2 ms | 256 KB | Output isn't correct |
4 | Incorrect | 2 ms | 376 KB | Output isn't correct |
5 | Incorrect | 2 ms | 376 KB | Output isn't correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 252 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 2 ms | 256 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 2 ms | 256 KB | Output is correct |
10 | Correct | 2 ms | 256 KB | Output is correct |
11 | Correct | 2 ms | 252 KB | Output is correct |
12 | Correct | 2 ms | 256 KB | Output is correct |
13 | Correct | 2 ms | 252 KB | Output is correct |
14 | Correct | 2 ms | 376 KB | Output is correct |
15 | Correct | 2 ms | 256 KB | Output is correct |
16 | Correct | 2 ms | 376 KB | Output is correct |
17 | Correct | 2 ms | 256 KB | Output is correct |
18 | Correct | 2 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Incorrect | 2 ms | 376 KB | Output isn't correct |
3 | Incorrect | 2 ms | 376 KB | Output isn't correct |
4 | Incorrect | 2 ms | 256 KB | Output isn't correct |
5 | Incorrect | 2 ms | 376 KB | Output isn't correct |
6 | Incorrect | 2 ms | 376 KB | Output isn't correct |
7 | Incorrect | 2 ms | 256 KB | Output isn't correct |
8 | Incorrect | 2 ms | 256 KB | Output isn't correct |
9 | Incorrect | 2 ms | 376 KB | Output isn't correct |
10 | Incorrect | 2 ms | 256 KB | Output isn't correct |
11 | Incorrect | 2 ms | 256 KB | Output isn't correct |
12 | Incorrect | 2 ms | 256 KB | Output isn't correct |