結果

問題 No.236 鴛鴦茶
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-09-18 23:39:55
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 5,291 ms
コンパイル使用メモリ 102,952 KB
実行使用メモリ 24,076 KB
最終ジャッジ日時 2023-09-25 09:59:51
合計ジャッジ時間 5,006 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
21,984 KB
testcase_01 AC 65 ms
21,904 KB
testcase_02 AC 65 ms
21,840 KB
testcase_03 AC 66 ms
21,984 KB
testcase_04 AC 67 ms
22,012 KB
testcase_05 AC 67 ms
21,888 KB
testcase_06 AC 67 ms
21,936 KB
testcase_07 AC 67 ms
23,980 KB
testcase_08 AC 66 ms
22,040 KB
testcase_09 AC 69 ms
21,940 KB
testcase_10 AC 67 ms
21,928 KB
testcase_11 AC 66 ms
21,920 KB
testcase_12 AC 67 ms
22,132 KB
testcase_13 AC 69 ms
21,924 KB
testcase_14 AC 68 ms
21,928 KB
testcase_15 AC 69 ms
22,088 KB
testcase_16 AC 69 ms
24,076 KB
testcase_17 AC 70 ms
21,916 KB
testcase_18 AC 69 ms
23,984 KB
testcase_19 AC 69 ms
21,960 KB
testcase_20 AC 67 ms
21,912 KB
testcase_21 AC 68 ms
21,876 KB
testcase_22 AC 70 ms
24,016 KB
testcase_23 AC 70 ms
23,884 KB
testcase_24 AC 69 ms
21,940 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 No236{
    static void Main(){
        var num=Console.ReadLine().Split(' ').Select(x=>decimal.Parse(x)).ToArray();
        decimal ans;
        decimal tea;
        decimal coffee=(num[3]/num[1])*num[0];
        if(coffee<=num[2]){
            ans=num[3]+coffee;
        }else{
            tea=(num[2]/num[0])*num[1];
            ans=tea+num[2];
        }
        Console.WriteLine(ans);
    }
}
0