結果

問題 No.485 方程式のお勉強
ユーザー GrenacheGrenache
提出日時 2017-02-24 22:21:35
言語 Java19
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 6,227 ms
コンパイル使用メモリ 72,032 KB
実行使用メモリ 39,812 KB
最終ジャッジ日時 2023-07-27 10:11:31
合計ジャッジ時間 9,614 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
39,288 KB
testcase_01 AC 125 ms
39,532 KB
testcase_02 AC 124 ms
39,180 KB
testcase_03 AC 125 ms
39,460 KB
testcase_04 AC 125 ms
39,396 KB
testcase_05 AC 124 ms
39,464 KB
testcase_06 AC 121 ms
39,288 KB
testcase_07 AC 124 ms
39,528 KB
testcase_08 AC 126 ms
39,444 KB
testcase_09 AC 125 ms
39,272 KB
testcase_10 AC 129 ms
39,088 KB
testcase_11 AC 128 ms
39,504 KB
testcase_12 AC 127 ms
39,008 KB
testcase_13 AC 131 ms
39,496 KB
testcase_14 AC 127 ms
39,812 KB
testcase_15 AC 130 ms
39,652 KB
testcase_16 AC 126 ms
39,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder485 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int a = sc.nextInt();
		int b = sc.nextInt();

		int x = b / a;

		if (a * x == b) {
			pr.println(x);
		} else {
			pr.println("NO");
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0