結果
問題 |
No.7 プライムナンバーゲーム
|
ユーザー |
![]() |
提出日時 | 2019-09-01 23:12:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 458 bytes |
コンパイル時間 | 368 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-29 20:35:35 |
合計ジャッジ時間 | 21,486 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 17 |
ソースコード
N = int(input()) LC = [0]*N LC[0] = 1 LC[1] = 1 pn = [2] for L in range(3, N): chk = True for L2 in pn: if L%L2 == 0:chk = False if chk == True:pn.append(L) for i in range(2,N): A = list(filter(lambda x: x <= i, pn)) B = [0]*len(A) flag = True for j in range(len(A)): if LC[i - A[j]] == 0: flag = False if flag == False: LC[i] = 1 if LC[N] == 0: print("Lose") else: print("Win")