結果

問題 No.538 N.G.S.
ユーザー GrenacheGrenache
提出日時 2017-06-30 22:48:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 749 bytes
コンパイル時間 3,356 ms
コンパイル使用メモリ 75,284 KB
実行使用メモリ 55,908 KB
最終ジャッジ日時 2024-04-15 06:49:08
合計ジャッジ時間 12,129 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
54,296 KB
testcase_01 AC 131 ms
54,164 KB
testcase_02 AC 133 ms
54,052 KB
testcase_03 AC 133 ms
54,080 KB
testcase_04 AC 135 ms
54,408 KB
testcase_05 AC 134 ms
54,056 KB
testcase_06 AC 134 ms
53,932 KB
testcase_07 WA -
testcase_08 AC 134 ms
54,292 KB
testcase_09 AC 133 ms
54,084 KB
testcase_10 AC 134 ms
54,172 KB
testcase_11 AC 133 ms
54,088 KB
testcase_12 AC 136 ms
54,368 KB
testcase_13 AC 134 ms
54,340 KB
testcase_14 WA -
testcase_15 AC 134 ms
54,384 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 135 ms
54,140 KB
testcase_19 AC 134 ms
54,228 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 133 ms
54,384 KB
testcase_29 AC 133 ms
54,120 KB
testcase_30 AC 135 ms
54,108 KB
testcase_31 AC 134 ms
54,296 KB
testcase_32 AC 132 ms
54,068 KB
testcase_33 AC 134 ms
54,352 KB
testcase_34 AC 122 ms
52,956 KB
testcase_35 AC 132 ms
54,108 KB
testcase_36 AC 134 ms
53,856 KB
testcase_37 AC 132 ms
54,300 KB
testcase_38 AC 131 ms
54,068 KB
testcase_39 AC 135 ms
53,864 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 136 ms
53,916 KB
testcase_45 AC 135 ms
54,200 KB
testcase_46 WA -
testcase_47 AC 136 ms
54,372 KB
testcase_48 AC 135 ms
54,352 KB
testcase_49 AC 136 ms
53,880 KB
testcase_50 AC 133 ms
54,144 KB
testcase_51 AC 135 ms
54,304 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main_yukicoder538 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int b1 = sc.nextInt();
		int b2 = sc.nextInt();
		int b3 = sc.nextInt();

		long r1 = b2 - b3;
		long r2 = b1 - b2;
		long d1 = b3 * b1 - b2 * b2;
//		long d2 = b2;

		if (r2 == 0) {
			pr.println(b3);
		} else {
			long d4 = (r1 * b3 + d1) / r2;
			pr.println(d4);
		}
	}

	// ---------------------------------------------------
	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