結果
| 問題 | No.882 約数倍数 |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2019-09-13 21:22:47 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 500 ms |
| + 755µs | |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 3,340 ms |
| コンパイル使用メモリ | 83,832 KB |
| 実行使用メモリ | 42,988 KB |
| 最終ジャッジ日時 | 2026-08-05 23:43:31 |
| 合計ジャッジ時間 | 5,478 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
sc.close();
for (int i = 1; i <= a; i++) {
if (a % i == 0 && i % b == 0) {
System.out.println("YES");
return;
}
}
System.out.println("NO");
}
}
ks2m