結果
| 問題 | No.3248 構築問題 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-08-29 21:33:38 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 35 ms / 2,000 ms | 
| コード長 | 253 bytes | 
| コンパイル時間 | 269 ms | 
| コンパイル使用メモリ | 82,088 KB | 
| 実行使用メモリ | 53,896 KB | 
| 最終ジャッジ日時 | 2025-08-29 21:33:44 | 
| 合計ジャッジ時間 | 1,069 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
ソースコード
n,x=map(int,input().split())
for y in range(1,int(n**.5)+1):
  if n%y:
    continue
  b,t=y,n//y
  a=int(t**(1/x))
  if a!=b and b*a**x==n:
    exit(print('Yes'))
  b,t=n//y,y
  a=int(t**(1/x))
  if a!=b and b*a**x==n:
    exit(print('Yes'))
print('No')
            
            
            
        