結果
| 問題 | 
                            No.2751 429-like Number
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-05-13 00:20:27 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 279 bytes | 
| コンパイル時間 | 310 ms | 
| コンパイル使用メモリ | 81,784 KB | 
| 実行使用メモリ | 155,152 KB | 
| 最終ジャッジ日時 | 2024-12-20 09:19:19 | 
| 合計ジャッジ時間 | 81,461 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 6 | 
| other | AC * 8 TLE * 14 | 
ソースコード
import math
Q=int(input())
def isOk(x):
  count=0
  for i in range(2, math.floor(math.sqrt(x))+9):
    while x%i==0:
      x//=i
      count+=1
      if count>3: return 0
  if x!=1: count+=1
  return [0, 1][count==3]
for _ in range(Q):
  print(["No", "Yes"][isOk(int(input()))])