結果

問題 No.476 正しくない平均
ユーザー htkbhtkb
提出日時 2017-02-01 22:27:55
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 12,242 ms
コンパイル使用メモリ 419,440 KB
実行使用メモリ 54,120 KB
最終ジャッジ日時 2023-08-12 17:22:54
合計ジャッジ時間 22,542 ms
ジャッジサーバーID
(参考情報)
judge12 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 318 ms
53,308 KB
testcase_01 AC 324 ms
53,608 KB
testcase_02 AC 331 ms
53,536 KB
testcase_03 AC 322 ms
53,668 KB
testcase_04 AC 319 ms
53,436 KB
testcase_05 AC 321 ms
53,380 KB
testcase_06 AC 320 ms
53,664 KB
testcase_07 AC 317 ms
53,392 KB
testcase_08 AC 315 ms
53,704 KB
testcase_09 AC 317 ms
53,648 KB
testcase_10 AC 319 ms
53,336 KB
testcase_11 AC 320 ms
53,436 KB
testcase_12 AC 323 ms
53,412 KB
testcase_13 AC 327 ms
53,596 KB
testcase_14 AC 323 ms
53,660 KB
testcase_15 AC 323 ms
53,728 KB
testcase_16 AC 321 ms
53,564 KB
testcase_17 AC 329 ms
53,440 KB
testcase_18 AC 323 ms
53,240 KB
testcase_19 AC 326 ms
53,400 KB
testcase_20 AC 325 ms
53,668 KB
testcase_21 AC 324 ms
53,652 KB
testcase_22 AC 320 ms
53,492 KB
testcase_23 AC 322 ms
53,432 KB
testcase_24 AC 329 ms
53,484 KB
testcase_25 AC 324 ms
53,456 KB
testcase_26 AC 321 ms
54,120 KB
testcase_27 AC 318 ms
53,388 KB
testcase_28 AC 322 ms
53,464 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 sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = sc.nextLong()*n;
    var total:Long = 0;
    for (i in 1..n) {
        total += sc.nextLong()
    }
    if (a == total) println("YES") else println("NO")

}
0