結果
| 問題 |
No.882 約数倍数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-13 22:46:40 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 138 ms / 500 ms |
| コード長 | 664 bytes |
| コンパイル時間 | 3,990 ms |
| コンパイル使用メモリ | 75,244 KB |
| 実行使用メモリ | 41,584 KB |
| 最終ジャッジ日時 | 2024-07-04 10:08:34 |
| 合計ジャッジ時間 | 6,326 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
ソースコード
import java.io.*;
import java.util.Scanner;
public class Main_yukicoder882 {
private static Scanner sc;
private static Printer pr;
private static void solve() {
int a = sc.nextInt();
int b = sc.nextInt();
for (int d = 1; d <= a; d++) {
if (a % d == 0 && d % b == 0) {
pr.println("YES");
return;
}
}
pr.println("NO");
}
// ---------------------------------------------------
public static void main(String[] args) {
sc = new Scanner(System.in);
pr = new Printer(System.out);
solve();
pr.close();
sc.close();
}
static class Printer extends PrintWriter {
Printer(OutputStream out) {
super(out);
}
}
}