답안 #71946

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
71946 2018-08-26T02:03:18 Z 고윤하 연말콘 언제하니(#2246, jun6873) 천사의 모래시계 (FXCUP3_hourglass) C++17
58 / 100
3 ms 592 KB
#include <bits/stdc++.h>
using namespace std;

int n, ans[] = {0, 0, 0, 1, -1, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4};

int main() {
	cin >> n;

	if (n<15) cout << ans[n];
	else {
		if (n%5==0) cout << n/5;
		if (n%5==1) cout << n/5+1;
		if (n%5==2) cout << n/5+2;
		if (n%5==3) cout << n/5+1;
		if (n%5==4) cout << n/5+2;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 580 KB Output is correct
2 Correct 3 ms 504 KB Output is correct
3 Correct 2 ms 504 KB Output is correct
4 Correct 2 ms 504 KB Output is correct
5 Correct 3 ms 580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 580 KB Output is correct
2 Correct 3 ms 592 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 2 ms 580 KB Output is correct
5 Correct 3 ms 592 KB Output is correct
6 Correct 2 ms 580 KB Output is correct
7 Correct 3 ms 592 KB Output is correct
8 Correct 3 ms 592 KB Output is correct
9 Correct 2 ms 592 KB Output is correct
10 Correct 3 ms 592 KB Output is correct
11 Incorrect 2 ms 580 KB Output isn't correct
12 Correct 3 ms 580 KB Output is correct
13 Correct 2 ms 580 KB Output is correct
14 Correct 3 ms 580 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 2 ms 580 KB Output is correct
17 Correct 3 ms 592 KB Output is correct
18 Correct 2 ms 580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 592 KB Output is correct
2 Correct 3 ms 592 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 2 ms 592 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 3 ms 592 KB Output is correct
7 Correct 3 ms 592 KB Output is correct
8 Correct 3 ms 592 KB Output is correct
9 Correct 2 ms 592 KB Output is correct
10 Correct 2 ms 592 KB Output is correct
11 Correct 3 ms 592 KB Output is correct
12 Correct 3 ms 592 KB Output is correct