結果

問題 No.549 素材合成システム
ユーザー 💕💖💞💕💖💞
提出日時 2017-09-12 00:01:23
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 499 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 11,439 ms
コンパイル使用メモリ 416,200 KB
実行使用メモリ 63,960 KB
最終ジャッジ日時 2023-08-12 20:47:17
合計ジャッジ時間 34,416 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 285 ms
52,860 KB
testcase_01 AC 278 ms
53,104 KB
testcase_02 AC 290 ms
52,992 KB
testcase_03 AC 288 ms
52,776 KB
testcase_04 AC 289 ms
52,688 KB
testcase_05 AC 288 ms
52,684 KB
testcase_06 AC 291 ms
52,976 KB
testcase_07 AC 488 ms
60,020 KB
testcase_08 AC 492 ms
59,672 KB
testcase_09 AC 491 ms
59,952 KB
testcase_10 AC 495 ms
60,000 KB
testcase_11 AC 487 ms
59,732 KB
testcase_12 AC 492 ms
60,000 KB
testcase_13 AC 495 ms
60,120 KB
testcase_14 AC 495 ms
59,596 KB
testcase_15 AC 492 ms
59,944 KB
testcase_16 AC 497 ms
59,968 KB
testcase_17 AC 473 ms
57,568 KB
testcase_18 AC 468 ms
57,716 KB
testcase_19 AC 473 ms
57,788 KB
testcase_20 AC 471 ms
57,892 KB
testcase_21 AC 493 ms
59,912 KB
testcase_22 AC 487 ms
59,668 KB
testcase_23 AC 497 ms
63,960 KB
testcase_24 AC 493 ms
59,716 KB
testcase_25 AC 488 ms
57,936 KB
testcase_26 AC 490 ms
59,720 KB
testcase_27 AC 483 ms
57,596 KB
testcase_28 AC 287 ms
52,652 KB
testcase_29 AC 286 ms
52,772 KB
testcase_30 AC 288 ms
52,528 KB
testcase_31 AC 471 ms
57,616 KB
testcase_32 AC 467 ms
57,888 KB
testcase_33 AC 474 ms
57,784 KB
testcase_34 AC 476 ms
57,648 KB
testcase_35 AC 499 ms
59,692 KB
testcase_36 AC 468 ms
57,768 KB
testcase_37 AC 475 ms
57,812 KB
testcase_38 AC 286 ms
53,076 KB
testcase_39 AC 296 ms
52,724 KB
testcase_40 AC 485 ms
57,808 KB
testcase_41 AC 446 ms
57,596 KB
testcase_42 AC 323 ms
53,212 KB
testcase_43 AC 406 ms
56,116 KB
testcase_44 AC 373 ms
53,456 KB
testcase_45 AC 414 ms
55,912 KB
testcase_46 AC 393 ms
55,904 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^
Main.kt:8:14: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Int
  println(max!! + n)
             ^

ソースコード

diff #

fun main(args: Array<String>){
  readLine()
  val ss = readLine()!!.split(" ").map { it.toInt() }.toMutableList()
  val max = ss.max()
  val maxindex = ss.indexOf(max)
  ss.removeAt(maxindex)
  val n = ss.map { it/2 }.reduce { y,x -> y+x }
  println(max!! + n)
}
0