結果
| 問題 |
No.476 正しくない平均
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-07 22:54:24 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 346 bytes |
| コンパイル時間 | 1,387 ms |
| コンパイル使用メモリ | 32,460 KB |
| 実行使用メモリ | 27,672 KB |
| 最終ジャッジ日時 | 2025-04-07 22:54:28 |
| 合計ジャッジ時間 | 2,851 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 07 APR 2025 10:54:24 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.033
ソースコード
(defvar n)
(defvar a)
(defvar x)
(defvar temp)
(setq temp (read-from-string (concatenate 'string "(" (read-line) ")")))
(setq n (nth 0 temp))
(setq a (nth 1 temp))
(setq x (read-from-string (concatenate 'string "(" (read-line) ")")))
(defvar s)
(setq s 0)
(loop for i in x do
(setq s (+ s i))
)
(format t "~a~%" (if (= (* a n) s) "YES" "NO"))