結果

問題 No.476 正しくない平均
ユーザー 👑 はまやんはまやんはまやんはまやん
提出日時 2017-06-01 17:34:28
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 329 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 13,760 ms
コンパイル使用メモリ 411,964 KB
実行使用メモリ 53,908 KB
最終ジャッジ日時 2023-08-12 18:33:11
合計ジャッジ時間 24,429 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 320 ms
53,772 KB
testcase_01 AC 320 ms
53,696 KB
testcase_02 AC 324 ms
53,592 KB
testcase_03 AC 328 ms
53,580 KB
testcase_04 AC 329 ms
53,440 KB
testcase_05 AC 329 ms
53,504 KB
testcase_06 AC 328 ms
53,404 KB
testcase_07 AC 326 ms
53,392 KB
testcase_08 AC 325 ms
53,756 KB
testcase_09 AC 325 ms
53,908 KB
testcase_10 AC 325 ms
53,568 KB
testcase_11 AC 328 ms
53,648 KB
testcase_12 AC 324 ms
53,736 KB
testcase_13 AC 325 ms
53,432 KB
testcase_14 AC 328 ms
53,656 KB
testcase_15 AC 323 ms
53,464 KB
testcase_16 AC 322 ms
53,904 KB
testcase_17 AC 328 ms
53,536 KB
testcase_18 AC 323 ms
53,680 KB
testcase_19 AC 322 ms
53,500 KB
testcase_20 AC 325 ms
53,424 KB
testcase_21 AC 324 ms
53,752 KB
testcase_22 AC 323 ms
53,508 KB
testcase_23 AC 325 ms
53,488 KB
testcase_24 AC 319 ms
53,812 KB
testcase_25 AC 322 ms
53,632 KB
testcase_26 AC 321 ms
53,744 KB
testcase_27 AC 324 ms
53,472 KB
testcase_28 AC 326 ms
53,536 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import java.util.*

fun main(args: Array<String>) {
    val cin = Scanner(System.`in`)
    var N = cin.nextLong()
    var K = cin.nextLong()

    var sm = 0L
    for(i in 1..N) {
        var x = cin.nextInt()
        sm += x
    }

    println(if(sm == K * N) "YES" else "NO")
}
0