結果
問題 | No.882 約数倍数 |
ユーザー |
|
提出日時 | 2024-03-28 09:15:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 500 ms |
コード長 | 472 bytes |
コンパイル時間 | 4,316 ms |
コンパイル使用メモリ | 250,728 KB |
最終ジャッジ日時 | 2025-02-20 14:10:05 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 10 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int main() { int A, B; cin >> A >> B; for (int i = 1; i * i <= A; i++) { if (A % i == 0) { if (i % B == 0) { cout << "YES" << endl; return 0; } if (i * i != A) if ((A / i) % B == 0) { cout << "YES" << endl; return 0; }; } } cout << "NO" << endl; return 0; }