結果

問題 No.882 約数倍数
ユーザー mmn15277198
提出日時 2020-07-06 19:06:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 500 ms
コード長 384 bytes
コンパイル時間 840 ms
コンパイル使用メモリ 79,048 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-24 17:16:52
合計ジャッジ時間 1,350 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <math.h>
#include <map>
using namespace std;

int main(){
	int a,b;
	cin >> a >> b;
	
	for(long long i=1;i*i<=a;i++){
		if(a%i==0){
			if((i>=b && i%b==0) || ((a/i)>=b && (a/i)%b==0)){
				cout << "YES" << endl;
				return 0;
			}
		}
	}
	cout << "NO" << endl;
	
	return 0;
}
0