답안 #62591

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
62591 2018-07-29T09:09:14 Z 검수컵(#1978, imsifile) 천사의 모래시계 (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;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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