結果

問題 No.236 鴛鴦茶
ユーザー akichiakichi
提出日時 2017-08-19 00:45:54
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 4,367 ms
コンパイル使用メモリ 101,736 KB
実行使用メモリ 27,800 KB
最終ジャッジ日時 2023-09-10 22:13:03
合計ジャッジ時間 5,552 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
21,780 KB
testcase_01 AC 69 ms
25,772 KB
testcase_02 AC 67 ms
23,736 KB
testcase_03 AC 67 ms
23,752 KB
testcase_04 AC 68 ms
23,664 KB
testcase_05 AC 68 ms
23,712 KB
testcase_06 AC 68 ms
23,812 KB
testcase_07 AC 68 ms
27,764 KB
testcase_08 AC 68 ms
23,712 KB
testcase_09 AC 67 ms
25,928 KB
testcase_10 AC 67 ms
25,728 KB
testcase_11 AC 67 ms
21,652 KB
testcase_12 AC 67 ms
23,756 KB
testcase_13 AC 68 ms
25,856 KB
testcase_14 AC 68 ms
27,800 KB
testcase_15 AC 68 ms
25,816 KB
testcase_16 AC 67 ms
23,568 KB
testcase_17 AC 68 ms
23,612 KB
testcase_18 AC 68 ms
25,772 KB
testcase_19 AC 67 ms
23,632 KB
testcase_20 AC 67 ms
21,744 KB
testcase_21 AC 67 ms
23,676 KB
testcase_22 AC 68 ms
23,660 KB
testcase_23 AC 66 ms
25,688 KB
testcase_24 AC 67 ms
23,704 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
class Program {
    static void Main() {
        double[] line = Console.ReadLine().Split().Select(double.Parse).ToArray();
        double ans, a = line[0], b = line[1], x = line[2], y = line[3];
        if (0 < a * y - b * x) {
            ans = (a + b) * x / a;
        } else {
            ans = (a + b) * y / b;
        }

        Console.WriteLine(ans);
    }
}
0