結果

問題 No.7 プライムナンバーゲーム
ユーザー GuestGuest
提出日時 2018-03-21 12:39:55
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 265 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 51,372 KB
実行使用メモリ 7,772 KB
最終ジャッジ日時 2023-09-07 00:50:52
合計ジャッジ時間 13,015 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main() {
	int N,max=0;
	cin >> N;

	while (N > 3) {
		for (int i = 2; i < (N - 2); i++) {
			if ((N - 2) % i == 0)
				max = i;
		}
		N -= max;
	}

	if (N == 3) 
		cout << "Win" << endl;
	else
		cout << "Lose" << endl;
}
0