結果

問題 No.476 正しくない平均
ユーザー htkb
提出日時 2017-02-01 22:27:55
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 326 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 9,954 ms
コンパイル使用メモリ 432,660 KB
実行使用メモリ 51,488 KB
最終ジャッジ日時 2024-11-20 07:24:23
合計ジャッジ時間 20,209 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
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