結果
| 問題 | No.2751 429-like Number |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-15 20:59:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 593 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 82,424 KB |
| 実行使用メモリ | 154,008 KB |
| 最終ジャッジ日時 | 2024-12-20 10:27:14 |
| 合計ジャッジ時間 | 83,546 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 20 TLE * 2 |
ソースコード
q=int(input())
s=set([2])
def f(n):
for i in s:
if n%i==0:
return
s.add(n)
return True
i=3
p=10**5+2
while i<=p:
f(i)
i+=2
for i in range(q):
a=int(input())
k=0
while a!=1:
if a in s:
k+=1
break
t=True
for j in s:
if a%j==0:
k+=1
a//=j
t=False
if k>3:
break
if k>3:
break
if t:
a=1
k+=1
if k==3:
print("Yes")
else:
print("No")