結果

問題 No.7 プライムナンバーゲーム
ユーザー szkhtsszkhts
提出日時 2020-07-31 09:44:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 510 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-09-19 09:21:01
合計ジャッジ時間 2,194 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,768 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 16 ms
7,816 KB
testcase_05 AC 17 ms
7,876 KB
testcase_06 WA -
testcase_07 AC 18 ms
7,728 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 23 ms
7,776 KB
testcase_13 AC 23 ms
7,764 KB
testcase_14 AC 25 ms
7,748 KB
testcase_15 AC 24 ms
7,728 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def make_prime(f):
    prime_list = []

    if f >= 2:
        prime_list.append(2)
        
        for i in range(3, f, 2):
            isPrime = True
            j = 3
            while j * j <= i:
                if i % j == 0:
                    isPrime = False
                    break
                j += 1
            if isPrime:
                prime_list.append(i)
        
    return prime_list;

N = int(input())
ar = make_prime(N)

if len(ar) % 2 == 0:
    print("Win")
else:
    print("Lose")
0