結果

問題 No.1808 Fullgold Alchemist
ユーザー yudedakoyudedako
提出日時 2022-01-24 22:33:54
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,164 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 11,270 ms
コンパイル使用メモリ 259,244 KB
実行使用メモリ 85,528 KB
最終ジャッジ日時 2023-08-21 13:50:21
合計ジャッジ時間 54,195 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 896 ms
61,816 KB
testcase_01 AC 912 ms
62,048 KB
testcase_02 AC 916 ms
62,132 KB
testcase_03 AC 910 ms
62,008 KB
testcase_04 AC 917 ms
62,452 KB
testcase_05 AC 1,087 ms
72,876 KB
testcase_06 AC 1,107 ms
79,900 KB
testcase_07 AC 1,099 ms
79,472 KB
testcase_08 AC 1,157 ms
85,444 KB
testcase_09 AC 1,164 ms
85,528 KB
testcase_10 AC 1,161 ms
85,368 KB
testcase_11 AC 1,147 ms
85,168 KB
testcase_12 AC 1,125 ms
79,392 KB
testcase_13 AC 1,118 ms
79,600 KB
testcase_14 AC 1,123 ms
79,464 KB
testcase_15 AC 1,129 ms
79,660 KB
testcase_16 AC 956 ms
62,092 KB
testcase_17 AC 921 ms
63,028 KB
testcase_18 AC 1,024 ms
62,392 KB
testcase_19 AC 941 ms
61,744 KB
testcase_20 AC 1,036 ms
64,116 KB
testcase_21 AC 1,012 ms
62,220 KB
testcase_22 AC 925 ms
62,160 KB
testcase_23 AC 970 ms
62,692 KB
testcase_24 AC 940 ms
62,188 KB
testcase_25 AC 966 ms
61,756 KB
testcase_26 AC 1,044 ms
62,112 KB
testcase_27 AC 1,018 ms
62,228 KB
testcase_28 AC 1,116 ms
79,796 KB
testcase_29 AC 1,006 ms
64,300 KB
testcase_30 AC 1,015 ms
64,512 KB
testcase_31 AC 1,130 ms
77,652 KB
testcase_32 AC 1,081 ms
67,788 KB
testcase_33 AC 1,116 ms
73,360 KB
testcase_34 AC 1,125 ms
79,876 KB
testcase_35 AC 1,090 ms
70,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.io.StdIn.*
import scala.math.min

@main def main =
  val Array(n, m) = readLine().split(' ').map(_.toInt)
  val ore = readLine().split(' ').map(_.toInt)
  var sum = 0L
  var minAverage = Long.MaxValue
  for i <- 0 until n do
    sum += ore(i)
    val average = (sum / (i + 1)) / m
    minAverage = min(average, minAverage)
  println(minAverage)
0