結果

問題 No.804 野菜が苦手
ユーザー ktgw0316ktgw0316
提出日時 2019-03-29 23:10:34
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 308 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 11,277 ms
コンパイル使用メモリ 435,952 KB
実行使用メモリ 57,028 KB
最終ジャッジ日時 2024-04-30 20:04:43
合計ジャッジ時間 18,603 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 303 ms
56,944 KB
testcase_01 AC 301 ms
56,760 KB
testcase_02 AC 300 ms
56,820 KB
testcase_03 AC 306 ms
56,956 KB
testcase_04 AC 306 ms
56,788 KB
testcase_05 AC 303 ms
57,020 KB
testcase_06 AC 298 ms
56,864 KB
testcase_07 AC 302 ms
56,900 KB
testcase_08 AC 302 ms
56,852 KB
testcase_09 AC 299 ms
56,948 KB
testcase_10 AC 304 ms
56,904 KB
testcase_11 AC 301 ms
57,012 KB
testcase_12 AC 302 ms
56,780 KB
testcase_13 AC 308 ms
57,028 KB
testcase_14 AC 301 ms
56,784 KB
testcase_15 AC 301 ms
56,940 KB
testcase_16 AC 303 ms
56,944 KB
testcase_17 AC 304 ms
56,828 KB
testcase_18 AC 301 ms
56,824 KB
testcase_19 AC 302 ms
57,020 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import kotlin.math.min

fun main(args: Array<String>) {
    val (a, b, c, d) = readLine()!!.split(" ").map(String::toInt)
    val vegi0 = d / (c + 1)
    val vegi1 = min(vegi0, a)
    val meat = min(vegi1 * c, b)
    val vegi = meat / c
    println(vegi)
}
0