結果

問題 No.1389 Clumsy Calculation
ユーザー 👑 zeronosu77108zeronosu77108
提出日時 2021-02-12 21:51:51
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 624 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 14,597 ms
コンパイル使用メモリ 424,124 KB
実行使用メモリ 70,372 KB
最終ジャッジ日時 2023-09-27 03:44:28
合計ジャッジ時間 31,620 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 294 ms
54,804 KB
testcase_01 AC 290 ms
52,768 KB
testcase_02 AC 290 ms
52,968 KB
testcase_03 AC 353 ms
53,412 KB
testcase_04 AC 353 ms
53,120 KB
testcase_05 AC 357 ms
53,116 KB
testcase_06 AC 352 ms
52,968 KB
testcase_07 AC 355 ms
53,008 KB
testcase_08 AC 290 ms
52,816 KB
testcase_09 AC 624 ms
70,372 KB
testcase_10 AC 531 ms
63,740 KB
testcase_11 AC 335 ms
52,840 KB
testcase_12 AC 336 ms
53,084 KB
testcase_13 AC 334 ms
53,004 KB
testcase_14 AC 608 ms
68,560 KB
testcase_15 AC 602 ms
68,192 KB
testcase_16 AC 608 ms
68,496 KB
testcase_17 AC 612 ms
68,344 KB
testcase_18 AC 608 ms
68,368 KB
testcase_19 AC 608 ms
68,180 KB
testcase_20 AC 606 ms
68,384 KB
testcase_21 AC 602 ms
68,520 KB
testcase_22 AC 607 ms
68,276 KB
testcase_23 AC 606 ms
68,388 KB
testcase_24 AC 607 ms
68,348 KB
testcase_25 AC 611 ms
68,360 KB
testcase_26 AC 604 ms
68,868 KB
testcase_27 AC 610 ms
68,220 KB
testcase_28 AC 613 ms
68,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import kotlin.collections.*
import kotlin.math.*

@kotlin.ExperimentalStdlibApi
fun main() {
    val (n, x) = readLine()!!.split(" ").map { it.toLong() }
    val s = readLine()!!.split(" ").map { it.toLong() }.sum()

    println((s - x*n + x))
}
0