結果

問題 No.36 素数が嫌い!
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-06-09 03:18:29
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 641 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,192 KB
実行使用メモリ 81,592 KB
最終ジャッジ日時 2023-08-30 03:31:59
合計ジャッジ時間 7,298 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 181 ms
77,208 KB
testcase_01 AC 230 ms
77,120 KB
testcase_02 AC 105 ms
73,032 KB
testcase_03 RE -
testcase_04 AC 105 ms
72,928 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 108 ms
77,004 KB
testcase_08 AC 109 ms
77,008 KB
testcase_09 AC 107 ms
77,016 KB
testcase_10 AC 108 ms
77,004 KB
testcase_11 AC 158 ms
77,100 KB
testcase_12 AC 263 ms
77,164 KB
testcase_13 AC 262 ms
77,188 KB
testcase_14 RE -
testcase_15 AC 105 ms
73,000 KB
testcase_16 AC 106 ms
73,212 KB
testcase_17 AC 106 ms
72,968 KB
testcase_18 AC 107 ms
77,168 KB
testcase_19 AC 166 ms
77,276 KB
testcase_20 AC 262 ms
77,144 KB
testcase_21 AC 227 ms
77,104 KB
testcase_22 AC 227 ms
77,108 KB
testcase_23 AC 179 ms
77,204 KB
testcase_24 AC 188 ms
77,008 KB
testcase_25 AC 191 ms
77,176 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
X = make_divisors(N)
if len(X)<=3:
    print('NO')
    exit()

if len(X)>=5:
    print('YES')
    exit()

X.sort()
p = P[1]
if all(i%p==0 for i in X[1:]):
    print('YES')
else:
    print('NO')
0