Submission #71946

#TimeUsernameProblemLanguageResultExecution timeMemory
71946고윤하 연말콘 언제하니 (#119)Angelic Hourglass (FXCUP3_hourglass)C++17
58 / 100
3 ms592 KiB
#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;
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...