Submission #71805

# Submission time Handle Problem Language Result Execution time Memory
71805 2018-08-25T16:14:58 Z the_general(#2235, dbtlswkdrnss) Angelic Hourglass (FXCUP3_hourglass) C++11
58 / 100
4 ms 560 KB
#include<stdio.h>

int n;

int main(){
	scanf("%d", &n);
	if(n==4){
		printf("-1\n");
		return 0;
	}
	else if(n%5==0){
		printf("%d\n", n/5);
		return 0;
	}
	else if(n%5==1){
		printf("%d\n", n/5+1);
		return 0;
	}
	else if(n%5==3){
		printf("%d\n", n/5+1);
		return 0;
	}
	else if(n%5==4){
		printf("%d\n", n/5+2);
		return 0;
	}
	else{
		printf("%d\n", n/5+3);
		return 0;
	}
}

Compilation message

hourglass.cpp: In function 'int main()':
hourglass.cpp:6:7: 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 488 KB Output is correct
3 Correct 4 ms 444 KB Output is correct
4 Correct 3 ms 360 KB Output is correct
5 Correct 2 ms 444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 560 KB Output isn't correct
2 Correct 2 ms 560 KB Output is correct
3 Correct 3 ms 552 KB Output is correct
4 Correct 2 ms 488 KB Output is correct
5 Correct 2 ms 560 KB Output is correct
6 Correct 3 ms 488 KB Output is correct
7 Correct 2 ms 552 KB Output is correct
8 Correct 3 ms 560 KB Output is correct
9 Correct 3 ms 488 KB Output is correct
10 Correct 2 ms 488 KB Output is correct
11 Correct 2 ms 488 KB Output is correct
12 Correct 2 ms 560 KB Output is correct
13 Correct 2 ms 488 KB Output is correct
14 Correct 2 ms 560 KB Output is correct
15 Correct 3 ms 560 KB Output is correct
16 Incorrect 2 ms 560 KB Output isn't correct
17 Correct 2 ms 560 KB Output is correct
18 Correct 2 ms 560 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 560 KB Output is correct
2 Correct 3 ms 560 KB Output is correct
3 Correct 2 ms 560 KB Output is correct
4 Correct 2 ms 560 KB Output is correct
5 Correct 2 ms 560 KB Output is correct
6 Correct 2 ms 560 KB Output is correct
7 Correct 2 ms 560 KB Output is correct
8 Correct 3 ms 560 KB Output is correct
9 Correct 2 ms 560 KB Output is correct
10 Correct 2 ms 560 KB Output is correct
11 Correct 2 ms 560 KB Output is correct
12 Correct 2 ms 560 KB Output is correct