結果

問題 No.36 素数が嫌い!
ユーザー irumo8202irumo8202
提出日時 2022-01-23 19:39:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 8,004 KB
最終ジャッジ日時 2023-08-20 01:35:23
合計ジャッジ時間 11,337 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 382 ms
7,852 KB
testcase_01 AC 466 ms
7,856 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 18 ms
7,984 KB
testcase_08 AC 16 ms
7,884 KB
testcase_09 AC 17 ms
7,852 KB
testcase_10 AC 17 ms
7,776 KB
testcase_11 AC 271 ms
7,800 KB
testcase_12 AC 807 ms
7,904 KB
testcase_13 WA -
testcase_14 AC 335 ms
7,852 KB
testcase_15 AC 16 ms
7,840 KB
testcase_16 AC 16 ms
7,796 KB
testcase_17 AC 16 ms
7,816 KB
testcase_18 AC 17 ms
7,852 KB
testcase_19 AC 324 ms
7,924 KB
testcase_20 AC 629 ms
7,772 KB
testcase_21 AC 618 ms
7,884 KB
testcase_22 AC 631 ms
7,856 KB
testcase_23 AC 388 ms
7,864 KB
testcase_24 AC 328 ms
7,848 KB
testcase_25 AC 424 ms
7,852 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-(n ** 0.5) // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


facts = factorization(N)

ans = False
if len(facts) >= 2 or facts[0][1] >= 2:
    ans = True

print("YES" if ans else "NO")
0