結果
問題 |
No.7 プライムナンバーゲーム
|
ユーザー |
|
提出日時 | 2020-04-03 04:10:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-06-28 17:41:14 |
合計ジャッジ時間 | 1,174 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 13 |
ソースコード
import math N=int(input()) cont=0 so_list=[True for i in range(N)] for i in range(2,int(math.sqrt(N))+1): if not so_list[i]: continue for j in range(i**2,N,i): so_list[j]=False Comparison=N for i in range(len(so_list)-1,1,-1): if so_list[i]: cont+=1 Comparison-=i if Comparison==1 or 0: break print('win' if cont%2==0 else 'Lose')