結果
| 問題 |
No.538 N.G.S.
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-30 22:48:27 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 749 bytes |
| コンパイル時間 | 2,944 ms |
| コンパイル使用メモリ | 75,136 KB |
| 実行使用メモリ | 55,828 KB |
| 最終ジャッジ日時 | 2024-10-04 20:47:46 |
| 合計ジャッジ時間 | 10,447 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 31 WA * 20 |
ソースコード
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);
}
}
}