結果

問題 No.2751 429-like Number
ユーザー yansi819
提出日時 2024-05-28 13:19:19
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 349 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 81,876 KB
実行使用メモリ 154,528 KB
最終ジャッジ日時 2024-12-20 20:48:00
合計ジャッジ時間 87,430 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 6 TLE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

def prime_factors(N):
    res = []
    for i in range(2, int(N ** 0.5) + 1):
        while N % i == 0:
            res.append(i)
            N //= i
    if N != 1: res.append(N)
    return res

Q = int(input())
for _ in range(Q):
    A = int(input())
    pf = prime_factors(A)
    if len(pf) == 3:
        print("Yes")
    else:
        print("No")
0