結果

問題 No.485 方程式のお勉強
ユーザー losiz17losiz17
提出日時 2017-04-21 16:42:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 3,481 ms
コンパイル使用メモリ 77,944 KB
実行使用メモリ 41,676 KB
最終ジャッジ日時 2024-04-14 23:20:14
合計ジャッジ時間 6,531 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
41,320 KB
testcase_01 AC 126 ms
41,416 KB
testcase_02 AC 128 ms
41,616 KB
testcase_03 AC 131 ms
41,612 KB
testcase_04 AC 125 ms
41,440 KB
testcase_05 AC 126 ms
41,248 KB
testcase_06 AC 126 ms
41,676 KB
testcase_07 AC 130 ms
41,552 KB
testcase_08 AC 128 ms
41,544 KB
testcase_09 AC 112 ms
40,320 KB
testcase_10 AC 128 ms
41,300 KB
testcase_11 AC 111 ms
40,020 KB
testcase_12 AC 122 ms
41,340 KB
testcase_13 AC 130 ms
41,548 KB
testcase_14 AC 127 ms
41,380 KB
testcase_15 AC 126 ms
41,312 KB
testcase_16 AC 118 ms
41,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Houteisiki {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		if(b/a -(double)b/(double)a == 0){
			System.out.println(b/a);
		}else{
			System.out.println("NO");
		}

	}

}
0