結果

問題 No.36 素数が嫌い!
ユーザー Konton7Konton7
提出日時 2019-05-17 15:37:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 12,016 KB
実行使用メモリ 237,388 KB
最終ジャッジ日時 2023-10-17 07:21:09
合計ジャッジ時間 13,474 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 197 ms
115,436 KB
testcase_01 AC 623 ms
186,772 KB
testcase_02 AC 27 ms
10,160 KB
testcase_03 AC 27 ms
10,108 KB
testcase_04 AC 27 ms
10,160 KB
testcase_05 AC 30 ms
10,716 KB
testcase_06 AC 31 ms
10,768 KB
testcase_07 AC 30 ms
10,768 KB
testcase_08 AC 27 ms
10,360 KB
testcase_09 AC 28 ms
10,636 KB
testcase_10 WA -
testcase_11 AC 353 ms
83,924 KB
testcase_12 AC 1,075 ms
237,388 KB
testcase_13 WA -
testcase_14 AC 271 ms
151,060 KB
testcase_15 AC 28 ms
10,160 KB
testcase_16 AC 29 ms
10,160 KB
testcase_17 AC 27 ms
10,076 KB
testcase_18 AC 28 ms
10,252 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 335 ms
129,376 KB
testcase_25 AC 229 ms
127,460 KB
testcase_26 AC 682 ms
147,628 KB
testcase_27 AC 911 ms
204,900 KB
testcase_28 AC 632 ms
145,056 KB
testcase_29 AC 1,018 ms
230,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
plist = [2] + [ i for i in range(3,int(n**0.5)+2,2) ]

if n < 7:
    print("NO")

else:
    q = 0
    clist = []
    for i in plist:
        if n % i == 0:
            clist.append(i)
            n //= i
            if n % i == 0:
                print("YES")
                q = 1
                break
            elif len(clist) == 3:
                print("YES")
                q = 1
                break
    if q == 0:
        print("NO")
                
0