Submission #71739

# Submission time Handle Problem Language Result Execution time Memory
71739 2018-08-25T13:55:58 Z 퍼솔 가즈아ㅏㅏㅏ(#2222, 16silver) Angelic Hourglass (FXCUP3_hourglass) C++
100 / 100
3 ms 620 KB
#include <cstdio>
int a[20]={0,0,0,1,-1,1,2,4,2,3,2,3,4,3,4,3};
int main(){
    int N;
    scanf("%d",&N);
    if(N<16) printf("%d",a[N]);
    else{
        if(N%5==0) printf("%d",N/5);
        else if(N%5==1 || N%5==3) printf("%d",N/5+1);
        else printf("%d",N/5+2);
    }
}

Compilation message

hourglass.cpp: In function 'int main()':
hourglass.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&N);
     ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 420 KB Output is correct
3 Correct 1 ms 440 KB Output is correct
4 Correct 2 ms 440 KB Output is correct
5 Correct 2 ms 360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 548 KB Output is correct
2 Correct 2 ms 548 KB Output is correct
3 Correct 2 ms 548 KB Output is correct
4 Correct 2 ms 548 KB Output is correct
5 Correct 2 ms 516 KB Output is correct
6 Correct 2 ms 548 KB Output is correct
7 Correct 2 ms 516 KB Output is correct
8 Correct 2 ms 548 KB Output is correct
9 Correct 1 ms 548 KB Output is correct
10 Correct 2 ms 548 KB Output is correct
11 Correct 2 ms 440 KB Output is correct
12 Correct 2 ms 548 KB Output is correct
13 Correct 2 ms 548 KB Output is correct
14 Correct 2 ms 548 KB Output is correct
15 Correct 2 ms 548 KB Output is correct
16 Correct 2 ms 548 KB Output is correct
17 Correct 2 ms 548 KB Output is correct
18 Correct 3 ms 548 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 548 KB Output is correct
2 Correct 2 ms 548 KB Output is correct
3 Correct 2 ms 548 KB Output is correct
4 Correct 3 ms 620 KB Output is correct
5 Correct 2 ms 548 KB Output is correct
6 Correct 2 ms 548 KB Output is correct
7 Correct 2 ms 548 KB Output is correct
8 Correct 2 ms 548 KB Output is correct
9 Correct 3 ms 548 KB Output is correct
10 Correct 2 ms 620 KB Output is correct
11 Correct 2 ms 548 KB Output is correct
12 Correct 2 ms 548 KB Output is correct