結果

問題 No.476 正しくない平均
ユーザー hebiyanhebiyan
提出日時 2017-01-31 23:06:36
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 13,608 KB
最終ジャッジ日時 2023-08-25 22:42:40
合計ジャッジ時間 2,038 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,616 KB
testcase_01 AC 18 ms
11,780 KB
testcase_02 AC 17 ms
11,828 KB
testcase_03 AC 18 ms
11,812 KB
testcase_04 AC 17 ms
11,532 KB
testcase_05 AC 18 ms
11,672 KB
testcase_06 AC 18 ms
11,592 KB
testcase_07 AC 18 ms
11,608 KB
testcase_08 AC 18 ms
11,532 KB
testcase_09 AC 17 ms
11,536 KB
testcase_10 AC 17 ms
11,792 KB
testcase_11 AC 17 ms
11,868 KB
testcase_12 AC 18 ms
11,812 KB
testcase_13 AC 17 ms
11,540 KB
testcase_14 AC 18 ms
11,660 KB
testcase_15 AC 17 ms
11,532 KB
testcase_16 AC 17 ms
11,580 KB
testcase_17 AC 17 ms
11,532 KB
testcase_18 AC 18 ms
11,812 KB
testcase_19 AC 17 ms
11,788 KB
testcase_20 AC 18 ms
11,536 KB
testcase_21 AC 18 ms
11,540 KB
testcase_22 AC 18 ms
11,620 KB
testcase_23 AC 18 ms
11,704 KB
testcase_24 AC 17 ms
11,596 KB
testcase_25 AC 17 ms
11,704 KB
testcase_26 AC 18 ms
11,692 KB
testcase_27 AC 18 ms
13,608 KB
testcase_28 AC 17 ms
11,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(let ((n (read)) (avr (read)))
  (let loop ((m 0) (sum 0))
    (if (= m n)
	(if (= sum (* n avr))
	    (print "YES")
	    (print "NO"))
	(loop (+ m 1) (+ sum (read))))))
0