結果

問題 No.36 素数が嫌い!
ユーザー tnodinotnodino
提出日時 2022-02-15 06:24:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 8,104 KB
最終ジャッジ日時 2023-09-11 16:53:46
合計ジャッジ時間 11,250 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 379 ms
7,920 KB
testcase_01 AC 466 ms
7,952 KB
testcase_02 AC 15 ms
7,912 KB
testcase_03 WA -
testcase_04 AC 15 ms
8,064 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 17 ms
7,920 KB
testcase_08 AC 16 ms
8,016 KB
testcase_09 WA -
testcase_10 AC 17 ms
7,952 KB
testcase_11 AC 272 ms
7,980 KB
testcase_12 AC 796 ms
7,892 KB
testcase_13 AC 805 ms
7,944 KB
testcase_14 WA -
testcase_15 AC 15 ms
8,052 KB
testcase_16 AC 15 ms
7,972 KB
testcase_17 AC 16 ms
8,068 KB
testcase_18 WA -
testcase_19 AC 326 ms
7,964 KB
testcase_20 AC 631 ms
7,892 KB
testcase_21 AC 613 ms
7,940 KB
testcase_22 AC 637 ms
7,876 KB
testcase_23 AC 390 ms
7,976 KB
testcase_24 AC 325 ms
7,972 KB
testcase_25 AC 424 ms
7,908 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt
def PrimeFactorization(N):
    ret = []
    for i in range(2,int(sqrt(N))+1):
        if N % i == 0:
            ret.append(i)
            while N % i == 0:
                N //= i
    if N > 1:
        ret.append(N)
    return ret

N = int(input())
P = PrimeFactorization(N)
if len(P) >= 2:
    print('YES')
else:
    print('NO')
0