結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-05-26 17:16:09 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 629 bytes |
| コンパイル時間 | 3,746 ms |
| コンパイル使用メモリ | 74,788 KB |
| 実行使用メモリ | 54,436 KB |
| 最終ジャッジ日時 | 2024-09-17 15:16:34 |
| 合計ジャッジ時間 | 7,091 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 7 WA * 16 |
ソースコード
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Collections;
public class No236 {
public static void main(String[] args) {
// 標準入力から読み込む際に、Scannerオブジェクトを使う。
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
int x = s.nextInt();
int y = s.nextInt();
double tempx = (a * y) / b;
double tempy = (b * x) / a;
if(x >= y && tempy <= y) {
System.out.println(x + tempy);
}else {
System.out.println(tempx + y);
}
}
}