結果

問題 No.476 正しくない平均
ユーザー 👑 はまやんはまやんはまやんはまやん
提出日時 2017-06-01 17:32:45
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 10,936 ms
コンパイル使用メモリ 430,100 KB
実行使用メモリ 55,448 KB
最終ジャッジ日時 2024-04-30 13:35:52
合計ジャッジ時間 18,897 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 292 ms
55,160 KB
testcase_01 AC 296 ms
55,300 KB
testcase_02 AC 290 ms
55,416 KB
testcase_03 AC 290 ms
55,252 KB
testcase_04 AC 292 ms
55,152 KB
testcase_05 AC 295 ms
55,152 KB
testcase_06 AC 293 ms
55,340 KB
testcase_07 AC 295 ms
55,188 KB
testcase_08 AC 296 ms
55,292 KB
testcase_09 AC 289 ms
55,296 KB
testcase_10 AC 285 ms
55,448 KB
testcase_11 AC 295 ms
55,252 KB
testcase_12 AC 295 ms
55,372 KB
testcase_13 AC 289 ms
55,188 KB
testcase_14 AC 289 ms
55,228 KB
testcase_15 AC 297 ms
55,316 KB
testcase_16 AC 292 ms
55,196 KB
testcase_17 AC 296 ms
55,292 KB
testcase_18 AC 304 ms
55,292 KB
testcase_19 WA -
testcase_20 AC 287 ms
55,316 KB
testcase_21 AC 295 ms
55,252 KB
testcase_22 AC 298 ms
55,352 KB
testcase_23 AC 284 ms
55,304 KB
testcase_24 AC 348 ms
55,200 KB
testcase_25 AC 293 ms
55,300 KB
testcase_26 AC 287 ms
55,180 KB
testcase_27 AC 306 ms
55,240 KB
testcase_28 AC 291 ms
55,280 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.nextInt()
    var K = cin.nextInt()

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

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