結果
| 問題 |
No.236 鴛鴦茶
|
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-09-18 23:39:55 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 436 bytes |
| コンパイル時間 | 3,550 ms |
| コンパイル使用メモリ | 113,544 KB |
| 実行使用メモリ | 19,200 KB |
| 最終ジャッジ日時 | 2024-07-18 08:09:14 |
| 合計ジャッジ時間 | 2,353 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
コンパイルメッセージ
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=>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);
}
}
pirorirori_n712