結果

問題 No.2051 Divide
ユーザー CAT_CATCAT_CAT
提出日時 2022-08-21 12:58:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 4,063 ms
コンパイル使用メモリ 253,048 KB
最終ジャッジ日時 2025-01-31 02:16:46
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<atcoder/all>
#define int long long
#define double long double
using namespace std;
int size(int number){
    string numstr=to_string(number);
    return numstr.size();
}
signed main(void){
    int A,B;
    cin>>A>>B;
    int ans=0;
    for(int i=1;i<floor(sqrt(A))+1;++i){
        if(A%i==0){
            if((A/i)%B==0){
                ++ans;
            }
            if(A/i==i)continue;
            if(i%B==0){
                ++ans;
            }
        }
    }
    cout<<ans<<endl;
}

 
0