結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
bigbear90560
|
| 提出日時 | 2015-07-15 03:47:32 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 629 bytes |
| コンパイル時間 | 2,783 ms |
| コンパイル使用メモリ | 74,376 KB |
| 実行使用メモリ | 41,380 KB |
| 最終ジャッジ日時 | 2024-07-08 07:36:04 |
| 合計ジャッジ時間 | 6,208 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 5 WA * 18 |
ソースコード
import java.util.Scanner;
/**
* No.236 鴛鴦茶
*/
public class OshidoriTea {
public static void main(String[] args) {
// 標準入力から読み込む際に、Scannerオブジェクトを使う。
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
int l = a * y;
int r = b * x;
double d = 0d;
if (r < l) {
d = x + y - (r - l) / (double) b;
} else {
d = x + y - (l - r) / (double) a;
}
System.out.println(d);
}
}
bigbear90560