結果

問題 No.2751 429-like Number
ユーザー tassei903tassei903
提出日時 2024-05-10 21:33:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,565 ms / 4,000 ms
コード長 781 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 78,304 KB
最終ジャッジ日時 2024-05-10 21:34:29
合計ジャッジ時間 26,064 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
62,516 KB
testcase_01 AC 49 ms
63,240 KB
testcase_02 AC 52 ms
62,872 KB
testcase_03 AC 52 ms
63,372 KB
testcase_04 AC 48 ms
62,928 KB
testcase_05 AC 49 ms
64,128 KB
testcase_06 AC 53 ms
64,112 KB
testcase_07 AC 1,104 ms
77,216 KB
testcase_08 AC 1,563 ms
74,092 KB
testcase_09 AC 1,547 ms
70,808 KB
testcase_10 AC 1,551 ms
70,796 KB
testcase_11 AC 1,565 ms
74,776 KB
testcase_12 AC 1,052 ms
78,304 KB
testcase_13 AC 1,535 ms
73,956 KB
testcase_14 AC 1,532 ms
72,060 KB
testcase_15 AC 58 ms
71,844 KB
testcase_16 AC 1,375 ms
77,740 KB
testcase_17 AC 1,345 ms
77,496 KB
testcase_18 AC 983 ms
77,976 KB
testcase_19 AC 1,023 ms
77,536 KB
testcase_20 AC 970 ms
77,412 KB
testcase_21 AC 988 ms
77,216 KB
testcase_22 AC 963 ms
77,604 KB
testcase_23 AC 1,040 ms
77,400 KB
testcase_24 AC 998 ms
77,480 KB
testcase_25 AC 1,032 ms
77,728 KB
testcase_26 AC 998 ms
77,572 KB
testcase_27 AC 1,027 ms
77,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

n = 10**5
a = [0]*n
primes = []
for i in range(2,n):
    if a[i]==0:
        primes.append(i)
        for j in range(i,n,i):
            a[j] = 1

for _ in range(ni()):
    n = ni()
    c = 0
    for p in primes:
        if n%p==0:
            while n%p==0:
                n//=p
                c += 1
            if c > 3:
                break
    if n > 1:
        c += 1
    if c == 3:
        Yes()
    else:
        No()
0