結果

問題 No.882 約数倍数
ユーザー Forested
提出日時 2020-05-26 13:53:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 500 ms
コード長 500 bytes
コンパイル時間 1,016 ms
コンパイル使用メモリ 91,436 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-13 02:41:05
合計ジャッジ時間 1,459 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
using namespace std;

int main() {
    int A, B;
    cin >> A >> B;
    bool ans = false;
    for (int i = B; i <= A; ++i) {
        if (A % i == 0 && i % B == 0) ans = true;
    }
    cout << (ans ? "YES\n" : "NO\n");
    return 0;
}
0