結果
| 問題 |
No.2051 Divide
|
| コンテスト | |
| ユーザー |
yukster714
|
| 提出日時 | 2023-05-05 12:50:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 340 bytes |
| コンパイル時間 | 647 ms |
| コンパイル使用メモリ | 68,356 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-22 22:10:25 |
| 合計ジャッジ時間 | 1,908 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 16 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int A,B;cin>>A>>B;
int count =0;
for (int i = 1; i <= sqrt(A); i++) {
if (A % i != 0) continue;
// iはAの約数
if ((i * B) % A == 0) count++;
if (i != A/i && ((A/i) * B) % A == 0) count++;
}
cout << count << endl;
return 0;
}
yukster714