結果

問題 No.485 方程式のお勉強
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-03 01:42:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 548 bytes
コンパイル時間 5,299 ms
コンパイル使用メモリ 71,372 KB
実行使用メモリ 49,576 KB
最終ジャッジ日時 2023-08-10 00:15:25
合計ジャッジ時間 6,405 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,140 KB
testcase_01 AC 43 ms
49,276 KB
testcase_02 AC 43 ms
49,080 KB
testcase_03 AC 43 ms
49,284 KB
testcase_04 AC 42 ms
49,576 KB
testcase_05 AC 43 ms
48,972 KB
testcase_06 AC 43 ms
49,460 KB
testcase_07 AC 42 ms
49,024 KB
testcase_08 AC 42 ms
49,092 KB
testcase_09 AC 43 ms
49,012 KB
testcase_10 AC 42 ms
49,180 KB
testcase_11 AC 42 ms
49,224 KB
testcase_12 AC 42 ms
49,084 KB
testcase_13 AC 41 ms
49,356 KB
testcase_14 AC 42 ms
49,072 KB
testcase_15 AC 42 ms
49,212 KB
testcase_16 AC 43 ms
49,268 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