結果

問題 No.882 約数倍数
ユーザー yicodeyicode
提出日時 2023-06-13 16:00:50
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 1,673 ms
コンパイル使用メモリ 166,276 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-22 01:13:21
合計ジャッジ時間 2,337 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 5 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
int main() {
  int A,B; cin >> A >> B;
  bool fire = false;
  for(int i = 1; i <= A; i++) {
    if(A % i == 0 && i % B == 0) {
      cout << i << endl;
      fire = true;
    }
  }
  if(fire) cout << "YES" << endl;
  else cout << "NO" << endl;
}
0