結果

問題 No.485 方程式のお勉強
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-03 01:42:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 548 bytes
コンパイル時間 3,294 ms
コンパイル使用メモリ 74,604 KB
実行使用メモリ 50,376 KB
最終ジャッジ日時 2024-04-27 18:18:52
合計ジャッジ時間 5,023 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
50,104 KB
testcase_01 AC 49 ms
50,124 KB
testcase_02 AC 47 ms
49,980 KB
testcase_03 AC 47 ms
50,052 KB
testcase_04 AC 48 ms
49,944 KB
testcase_05 AC 46 ms
50,024 KB
testcase_06 AC 47 ms
49,920 KB
testcase_07 AC 49 ms
49,800 KB
testcase_08 AC 46 ms
50,376 KB
testcase_09 AC 46 ms
50,060 KB
testcase_10 AC 47 ms
50,076 KB
testcase_11 AC 45 ms
50,276 KB
testcase_12 AC 45 ms
49,684 KB
testcase_13 AC 44 ms
49,972 KB
testcase_14 AC 45 ms
49,924 KB
testcase_15 AC 45 ms
50,140 KB
testcase_16 AC 49 ms
49,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No485 {
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			if(B%A ==0) System.out.println(B/A);
			else System.out.println("NO");
			
		}catch(IOException e){
			e.getStackTrace();
		}catch(NumberFormatException e){
		e.getStackTrace();
		}
	}
}
0