結果
| 問題 |
No.882 約数倍数
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2019-09-13 21:22:47 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 130 ms / 500 ms |
| コード長 | 361 bytes |
| コンパイル時間 | 2,096 ms |
| コンパイル使用メモリ | 74,412 KB |
| 実行使用メモリ | 54,272 KB |
| 最終ジャッジ日時 | 2024-07-04 03:55:03 |
| 合計ジャッジ時間 | 4,312 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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