結果
| 問題 | 
                            No.2051 Divide
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-10-14 15:17:43 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 277 bytes | 
| コンパイル時間 | 79 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 24,512 KB | 
| 最終ジャッジ日時 | 2024-06-26 12:38:17 | 
| 合計ジャッジ時間 | 6,456 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | TLE * 1 -- * 1 | 
| other | -- * 23 | 
ソースコード
a,b=list(map(int,input().split()))
if a%b!=0:
    print(0)
else:    
    i=2
    c=1
    while a>=i:
        n=0
        while a%i==0:
            a//=i
            n+=1
        while b%i==0:
            b//=i
            n-=1
        if n!=0:
            c*=(n+1)
    print(c)