結果
問題 |
No.236 鴛鴦茶
|
ユーザー |
![]() |
提出日時 | 2018-09-18 23:32:22 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 686 ms |
コンパイル使用メモリ | 114,580 KB |
実行使用メモリ | 29,436 KB |
最終ジャッジ日時 | 2024-07-18 08:09:05 |
合計ジャッジ時間 | 1,971 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 7 WA * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; class No236{ static void Main(){ var num=Console.ReadLine().Split(' ').Select(x=>Int32.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); } }