結果
問題 |
No.7 プライムナンバーゲーム
|
ユーザー |
|
提出日時 | 2018-03-21 10:51:53 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 392 ms |
コンパイル使用メモリ | 56,068 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 19:25:44 |
合計ジャッジ時間 | 1,144 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 10 |
ソースコード
//プライムナンバーゲーム #include<iostream> using namespace std; int main() { int N; bool t = true; cin >> N; if (N == 2) t = false; for (int i = 2; i < (N - 2); i++) { if ((N - 2) % i == 0) t = false; } if (t == true) cout << "Win" << endl; else cout << "Lose" << endl; }