結果

問題 No.485 方程式のお勉強
ユーザー GrenacheGrenache
提出日時 2017-02-24 22:21:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 3,854 ms
コンパイル使用メモリ 75,648 KB
実行使用メモリ 41,808 KB
最終ジャッジ日時 2024-04-14 22:43:32
合計ジャッジ時間 6,712 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
41,620 KB
testcase_01 AC 135 ms
41,656 KB
testcase_02 AC 135 ms
41,288 KB
testcase_03 AC 134 ms
41,444 KB
testcase_04 AC 138 ms
41,376 KB
testcase_05 AC 143 ms
41,212 KB
testcase_06 AC 135 ms
41,808 KB
testcase_07 AC 135 ms
41,220 KB
testcase_08 AC 135 ms
41,536 KB
testcase_09 AC 137 ms
41,336 KB
testcase_10 AC 140 ms
41,208 KB
testcase_11 AC 143 ms
41,652 KB
testcase_12 AC 140 ms
41,432 KB
testcase_13 AC 135 ms
41,656 KB
testcase_14 AC 136 ms
41,236 KB
testcase_15 AC 143 ms
41,320 KB
testcase_16 AC 137 ms
41,500 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