結果

問題 No.36 素数が嫌い!
ユーザー nbisconbisco
提出日時 2016-04-17 23:31:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,800 ms / 5,000 ms
コード長 251 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,440 KB
実行使用メモリ 8,056 KB
最終ジャッジ日時 2023-09-09 07:38:30
合計ジャッジ時間 35,013 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,229 ms
7,816 KB
testcase_01 AC 2,014 ms
7,888 KB
testcase_02 AC 15 ms
8,004 KB
testcase_03 AC 15 ms
7,832 KB
testcase_04 AC 15 ms
7,904 KB
testcase_05 AC 23 ms
7,892 KB
testcase_06 AC 23 ms
7,836 KB
testcase_07 AC 24 ms
7,844 KB
testcase_08 AC 18 ms
7,912 KB
testcase_09 AC 22 ms
7,976 KB
testcase_10 AC 21 ms
7,900 KB
testcase_11 AC 910 ms
7,904 KB
testcase_12 AC 2,635 ms
7,980 KB
testcase_13 AC 2,621 ms
7,976 KB
testcase_14 AC 1,570 ms
7,880 KB
testcase_15 AC 16 ms
8,028 KB
testcase_16 AC 16 ms
7,916 KB
testcase_17 AC 16 ms
7,840 KB
testcase_18 AC 17 ms
8,028 KB
testcase_19 AC 1,086 ms
7,888 KB
testcase_20 AC 2,619 ms
7,872 KB
testcase_21 AC 2,090 ms
8,044 KB
testcase_22 AC 2,182 ms
8,000 KB
testcase_23 AC 1,323 ms
7,900 KB
testcase_24 AC 1,409 ms
7,868 KB
testcase_25 AC 1,431 ms
7,884 KB
testcase_26 AC 1,684 ms
8,056 KB
testcase_27 AC 2,490 ms
7,912 KB
testcase_28 AC 1,707 ms
7,840 KB
testcase_29 AC 2,800 ms
7,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
#fileencoding: utf-8

from math import sqrt

M = N = int(input())
count = 0
i = 2
while M >= i*i:
    while N % i == 0:
        N //= i
        count += 1
    i += 1
if N > 1:
    count += 1
print("YES" if count >= 3 else "NO")
0