結果
| 問題 |
No.2051 Divide
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-29 17:43:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 368 bytes |
| コンパイル時間 | 2,404 ms |
| コンパイル使用メモリ | 193,584 KB |
| 最終ジャッジ日時 | 2025-02-09 21:52:38 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define all(a) a.begin(),a.end()
int main(){
int a,b;
cin >> a >> b;
int ans=0;
for(int i=1; i*i<=a; ++i){
if(i*i==a && i%b==0) ans++;
else if(a%i==0){
if(i%b==0) ans++;
if((a/i)%b==0) ans++;
}
}
cout << ans << endl;
return 0;
}