結果

問題 No.1224 I hate Sqrt Inequality
ユーザー ks2mks2m
提出日時 2020-09-11 21:31:32
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 384 bytes
コンパイル時間 2,575 ms
コンパイル使用メモリ 71,936 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2023-09-02 14:41:25
合計ジャッジ時間 5,783 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
53,420 KB
testcase_01 AC 140 ms
55,468 KB
testcase_02 AC 145 ms
55,620 KB
testcase_03 AC 134 ms
55,684 KB
testcase_04 AC 132 ms
55,540 KB
testcase_05 AC 139 ms
55,700 KB
testcase_06 AC 138 ms
55,720 KB
testcase_07 AC 149 ms
55,320 KB
testcase_08 AC 147 ms
56,036 KB
testcase_09 AC 142 ms
55,284 KB
testcase_10 AC 149 ms
56,064 KB
testcase_11 AC 143 ms
55,704 KB
testcase_12 AC 146 ms
55,284 KB
testcase_13 AC 145 ms
55,580 KB
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		sc.close();

		int cnt = 0;
		while (cnt < 100) {
			a %= b;
			if (a == 0) {
				System.out.println("No");
				return;
			}
			a *= 10;
			cnt++;
		}
		System.out.println("Yes");
	}
}
0