結果

問題 No.1517 Party Location
ユーザー バカらっく
提出日時 2022-02-03 14:23:34
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 404 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 13,632 ms
コンパイル使用メモリ 435,640 KB
実行使用メモリ 52,212 KB
最終ジャッジ日時 2024-06-11 11:19:22
合計ジャッジ時間 17,456 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
    val d = readLine()!!.toInt()
    val (a,b) = readLine()!!.split(" ").map { it.toInt() }
    val ans = (0..d).map { a*it + (d-it)*b }.minOrNull()
    println(ans)
}
0