結果

問題 No.476 正しくない平均
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-02-13 00:16:20
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 5,380 KB
実行使用メモリ 13,652 KB
最終ジャッジ日時 2023-08-28 14:58:59
合計ジャッジ時間 1,774 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
11,584 KB
testcase_01 AC 16 ms
11,692 KB
testcase_02 AC 16 ms
11,800 KB
testcase_03 AC 16 ms
11,484 KB
testcase_04 AC 16 ms
13,652 KB
testcase_05 AC 16 ms
11,488 KB
testcase_06 AC 16 ms
11,656 KB
testcase_07 AC 16 ms
11,792 KB
testcase_08 AC 16 ms
11,772 KB
testcase_09 AC 16 ms
11,768 KB
testcase_10 AC 16 ms
11,804 KB
testcase_11 AC 17 ms
11,664 KB
testcase_12 AC 16 ms
11,652 KB
testcase_13 AC 16 ms
11,704 KB
testcase_14 AC 19 ms
11,780 KB
testcase_15 AC 16 ms
11,660 KB
testcase_16 AC 16 ms
11,788 KB
testcase_17 AC 16 ms
11,596 KB
testcase_18 AC 16 ms
11,628 KB
testcase_19 AC 15 ms
11,544 KB
testcase_20 AC 16 ms
11,708 KB
testcase_21 AC 16 ms
11,624 KB
testcase_22 AC 15 ms
11,548 KB
testcase_23 AC 16 ms
11,708 KB
testcase_24 AC 16 ms
11,588 KB
testcase_25 AC 17 ms
11,644 KB
testcase_26 AC 17 ms
11,792 KB
testcase_27 AC 16 ms
11,692 KB
testcase_28 AC 16 ms
11,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (solve)
  (let* ((first-line (map string->number (string-split (read-line) #\space)))
         (xs (map string->number (string-split (read-line) #\space)))

         (n (car first-line))
         (a (cadr first-line))
         (avg (/ (fold + 0 xs) n)))
    (if (= avg a) "YES" "NO")))

(begin
  (display (solve))
  (newline))
0