結果

問題 No.538 N.G.S.
ユーザー GrenacheGrenache
提出日時 2017-06-30 22:51:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 699 bytes
コンパイル時間 3,742 ms
コンパイル使用メモリ 73,960 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-10-25 04:24:30
合計ジャッジ時間 12,923 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
57,448 KB
testcase_01 AC 133 ms
57,468 KB
testcase_02 AC 135 ms
57,500 KB
testcase_03 AC 133 ms
57,224 KB
testcase_04 AC 139 ms
57,284 KB
testcase_05 AC 138 ms
57,436 KB
testcase_06 AC 135 ms
57,400 KB
testcase_07 AC 135 ms
57,256 KB
testcase_08 AC 137 ms
57,184 KB
testcase_09 AC 140 ms
57,144 KB
testcase_10 AC 137 ms
57,144 KB
testcase_11 AC 141 ms
57,536 KB
testcase_12 AC 138 ms
57,448 KB
testcase_13 AC 136 ms
57,584 KB
testcase_14 AC 136 ms
57,404 KB
testcase_15 AC 135 ms
57,580 KB
testcase_16 AC 136 ms
57,368 KB
testcase_17 AC 136 ms
57,296 KB
testcase_18 AC 137 ms
57,180 KB
testcase_19 AC 139 ms
57,080 KB
testcase_20 AC 137 ms
57,068 KB
testcase_21 AC 136 ms
57,064 KB
testcase_22 AC 135 ms
57,204 KB
testcase_23 AC 136 ms
57,048 KB
testcase_24 AC 135 ms
57,072 KB
testcase_25 AC 135 ms
57,164 KB
testcase_26 AC 134 ms
57,108 KB
testcase_27 AC 135 ms
57,068 KB
testcase_28 AC 137 ms
57,168 KB
testcase_29 AC 137 ms
55,156 KB
testcase_30 AC 138 ms
57,060 KB
testcase_31 AC 138 ms
57,068 KB
testcase_32 AC 140 ms
55,052 KB
testcase_33 AC 137 ms
57,056 KB
testcase_34 AC 136 ms
57,064 KB
testcase_35 AC 136 ms
57,068 KB
testcase_36 AC 140 ms
57,180 KB
testcase_37 AC 144 ms
57,084 KB
testcase_38 AC 141 ms
57,076 KB
testcase_39 AC 144 ms
57,068 KB
testcase_40 AC 142 ms
57,084 KB
testcase_41 AC 144 ms
57,144 KB
testcase_42 AC 142 ms
57,068 KB
testcase_43 AC 138 ms
57,068 KB
testcase_44 AC 146 ms
57,120 KB
testcase_45 AC 138 ms
57,200 KB
testcase_46 AC 137 ms
57,124 KB
testcase_47 AC 135 ms
57,072 KB
testcase_48 AC 138 ms
57,072 KB
testcase_49 AC 139 ms
57,072 KB
testcase_50 AC 139 ms
57,072 KB
testcase_51 AC 136 ms
57,128 KB
testcase_52 AC 136 ms
57,064 KB
testcase_53 AC 134 ms
57,168 KB
testcase_54 AC 138 ms
57,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main_yukicoder538 {

	private static Scanner sc;
	private static Printer pr;

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

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

		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