結果

問題 No.236 鴛鴦茶
ユーザー バカらっくバカらっく
提出日時 2018-03-06 09:50:27
言語 Swift
(5.10.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 703 ms
コンパイル使用メモリ 109,628 KB
実行使用メモリ 7,772 KB
最終ジャッジ日時 2023-08-20 10:30:54
合計ジャッジ時間 2,011 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,516 KB
testcase_01 AC 4 ms
7,616 KB
testcase_02 AC 4 ms
7,628 KB
testcase_03 AC 3 ms
7,772 KB
testcase_04 AC 3 ms
7,624 KB
testcase_05 AC 3 ms
7,300 KB
testcase_06 AC 3 ms
7,740 KB
testcase_07 AC 4 ms
7,632 KB
testcase_08 AC 3 ms
7,632 KB
testcase_09 AC 3 ms
7,596 KB
testcase_10 AC 3 ms
7,528 KB
testcase_11 AC 3 ms
7,532 KB
testcase_12 AC 3 ms
7,656 KB
testcase_13 AC 4 ms
7,596 KB
testcase_14 AC 3 ms
7,484 KB
testcase_15 AC 3 ms
7,496 KB
testcase_16 AC 3 ms
7,604 KB
testcase_17 AC 3 ms
7,460 KB
testcase_18 AC 3 ms
7,620 KB
testcase_19 AC 3 ms
7,400 KB
testcase_20 AC 4 ms
7,744 KB
testcase_21 AC 4 ms
7,464 KB
testcase_22 AC 3 ms
7,740 KB
testcase_23 AC 3 ms
7,408 KB
testcase_24 AC 4 ms
7,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let inpt = readLine()!.split(separator: " ").map({Double($0)!})

var needTea = inpt[1] * inpt[2] / inpt[0]
var needCoffie = inpt[2]

if(needTea > inpt[3]) {
    needTea = inpt[3]
    needCoffie = inpt[0] * inpt[3] / inpt[1]
}

print(needTea + needCoffie)
0