結果

問題 No.476 正しくない平均
ユーザー 👑 はまやんはまやんはまやんはまやん
提出日時 2017-06-01 17:34:28
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 344 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 12,006 ms
コンパイル使用メモリ 428,440 KB
実行使用メモリ 55,440 KB
最終ジャッジ日時 2024-04-30 13:38:19
合計ジャッジ時間 23,399 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 327 ms
55,296 KB
testcase_01 AC 335 ms
55,152 KB
testcase_02 AC 342 ms
55,336 KB
testcase_03 AC 334 ms
55,196 KB
testcase_04 AC 336 ms
55,132 KB
testcase_05 AC 335 ms
55,340 KB
testcase_06 AC 334 ms
55,288 KB
testcase_07 AC 335 ms
55,300 KB
testcase_08 AC 329 ms
55,244 KB
testcase_09 AC 331 ms
55,396 KB
testcase_10 AC 344 ms
55,160 KB
testcase_11 AC 330 ms
55,248 KB
testcase_12 AC 331 ms
55,440 KB
testcase_13 AC 337 ms
55,188 KB
testcase_14 AC 329 ms
55,316 KB
testcase_15 AC 339 ms
55,208 KB
testcase_16 AC 339 ms
55,432 KB
testcase_17 AC 337 ms
55,264 KB
testcase_18 AC 340 ms
55,296 KB
testcase_19 AC 337 ms
55,312 KB
testcase_20 AC 335 ms
55,212 KB
testcase_21 AC 341 ms
55,272 KB
testcase_22 AC 333 ms
55,264 KB
testcase_23 AC 335 ms
55,192 KB
testcase_24 AC 341 ms
55,328 KB
testcase_25 AC 335 ms
55,268 KB
testcase_26 AC 338 ms
55,264 KB
testcase_27 AC 341 ms
55,156 KB
testcase_28 AC 344 ms
55,212 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