結果
問題 |
No.7 プライムナンバーゲーム
|
ユーザー |
![]() |
提出日時 | 2019-01-26 18:27:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-17 05:25:45 |
合計ジャッジ時間 | 1,581 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 17 |
ソースコード
from sympy import sieve n = int(input()) x = [-1] * (n + 1) x[0], x[1] = 1, 1 for i in range(2, n + 1): for j in sieve.primerange(1, n): if j > i: break if x[i - j] == -1: x[i] = 1 if x[-1] == 1: print('Win') else: print('Lose')