結果

問題 No.476 正しくない平均
ユーザー neko_the_shadow
提出日時 2017-02-13 00:16:20
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-12-29 17:10:41
合計ジャッジ時間 2,502 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

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