結果
| 問題 | 
                            No.1224 I hate Sqrt Inequality
                             | 
                    
| コンテスト | |
| ユーザー | 
                             rythem00359
                         | 
                    
| 提出日時 | 2020-09-17 14:01:29 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 340 bytes | 
| コンパイル時間 | 80 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 17,820 KB | 
| 最終ジャッジ日時 | 2024-06-22 06:32:02 | 
| 合計ジャッジ時間 | 3,983 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 8 WA * 1 TLE * 1 -- * 3 | 
ソースコード
from math import gcd
def func(n):
    if n%2!=0 and n%5!=0:return True
    while n%2==0 or n%5==0:
        if n%2==0:n//=2
        if n%5==0:n//=5
    for i in range(2,int(n),2):
        if n%(i+1)==0:return True
    return False
a,b=map(int,input().split())
if a==b:print('No')
else:
    b/=gcd(a,b)
    print('Yes' if func(b) else 'No')
            
            
            
        
            
rythem00359