結果
| 問題 |
No.7 プライムナンバーゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-20 17:35:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 350 bytes |
| コンパイル時間 | 369 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-11-20 17:35:23 |
| 合計ジャッジ時間 | 2,208 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 8 |
ソースコード
N = int(input()) #(2≦N≦10000)
Sosu = [True] * (N+1)
Sosu[0] = Sosu[1] = False
count = 0
for i in range (2,int(N ** (1/2) +1)):
if (Sosu[i] == True):
for j in range((i * i),(N +1),i):
Sosu[j] = False
else:
pass
for i in range(2,N+1):
if (Sosu[i]):
count += 1
else:
pass
if ((count % 2) != 0):
print("Win")
else:
print("Lose")