結果

問題 No.1517 Party Location
ユーザー fukafukatanifukafukatani
提出日時 2021-06-21 22:55:17
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,015 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 12,354 ms
コンパイル使用メモリ 250,484 KB
実行使用メモリ 63,620 KB
最終ジャッジ日時 2023-09-02 04:15:59
合計ジャッジ時間 29,249 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 988 ms
62,996 KB
testcase_01 AC 982 ms
62,912 KB
testcase_02 AC 1,010 ms
63,016 KB
testcase_03 AC 999 ms
62,788 KB
testcase_04 AC 994 ms
62,812 KB
testcase_05 AC 992 ms
63,620 KB
testcase_06 AC 997 ms
63,128 KB
testcase_07 AC 996 ms
63,316 KB
testcase_08 AC 996 ms
62,748 KB
testcase_09 AC 1,008 ms
63,088 KB
testcase_10 AC 1,005 ms
63,036 KB
testcase_11 AC 1,015 ms
63,108 KB
testcase_12 AC 991 ms
62,724 KB
testcase_13 AC 1,009 ms
62,768 KB
testcase_14 AC 1,006 ms
62,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val d = sc.nextInt
  val a, b = sc.nextInt
  val ans = (0 to d).map(_ * (a - b) + d  * b).min
  println(ans)
}
0