Submission #62591

# Submission time Handle Problem Language Result Execution time Memory
62591 2018-07-29T09:09:14 Z 검수컵(#1978, imsifile) Angelic Hourglass (FXCUP3_hourglass) C++
17 / 100
4 ms 628 KB
// https://www.acmicpc.net/board/view/22506

#include <iostream>
using namespace std;

int main (){
	int n;
	cin >> n;  // �Է¹޴� �� n
	if(n>=3 && n <= 5000){
		if((n % 5) == 0)
			cout << n /5;
		if((n % 5) != 0)
		{
			if(((n%5) % 3) == 0)
				cout << (n / 5) + (n%5) / 3;
			if(((n%5) % 3) != 0)
			{
				if((n%3) == 0)
					cout << n/3;
				if((n%3) != 0)
				{
					int k = 1;
					for(int i = 5; i < n ; i = i+5, k++){
						if((n-i)%3 == 0){
							cout << k+(n-i)/3;
							return 0;
						}
					}
					cout << -1;

				}
			}
		}
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 488 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 564 KB Output is correct
4 Correct 2 ms 436 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 3 ms 596 KB Output is correct
4 Correct 2 ms 564 KB Output is correct
5 Incorrect 2 ms 564 KB Output isn't correct
6 Correct 2 ms 564 KB Output is correct
7 Correct 2 ms 596 KB Output is correct
8 Correct 3 ms 564 KB Output is correct
9 Correct 3 ms 596 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 564 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 3 ms 596 KB Output is correct
14 Correct 3 ms 596 KB Output is correct
15 Correct 3 ms 596 KB Output is correct
16 Correct 2 ms 564 KB Output is correct
17 Correct 3 ms 596 KB Output is correct
18 Correct 2 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 628 KB Output is correct
2 Incorrect 2 ms 628 KB Output isn't correct
3 Incorrect 2 ms 596 KB Output isn't correct
4 Incorrect 4 ms 596 KB Output isn't correct
5 Correct 2 ms 628 KB Output is correct
6 Incorrect 3 ms 596 KB Output isn't correct
7 Incorrect 3 ms 596 KB Output isn't correct
8 Incorrect 3 ms 596 KB Output isn't correct
9 Incorrect 3 ms 596 KB Output isn't correct
10 Incorrect 3 ms 596 KB Output isn't correct
11 Incorrect 3 ms 596 KB Output isn't correct
12 Incorrect 2 ms 596 KB Output isn't correct