結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-10-10 20:53:00 |
| 言語 | Common Lisp (sbcl 2.6.7) |
| 結果 |
AC
不安定
|
| 実行時間 | 5 ms / 2,000 ms |
| + 896µs | |
| コード長 | 422 bytes |
| 記録 | |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 28,416 KB |
| 実行使用メモリ | 19,712 KB |
| 最終ジャッジ日時 | 2026-09-13 11:16:26 |
| 合計ジャッジ時間 | 1,766 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 13 SEP 2026 11:16:24 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.148
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((h (read))
(n (1- (read)))
(hs (sort (loop repeat n collect (read)) #'>))
(ans 1))
(loop for i below n
while (< h (elt hs i))
do (incf ans)
finally (princ ans))
(case (mod ans 10)
(1 (princ "st"))
(2 (princ "nd"))
(3 (princ "rd"))
(t (princ "th")))
(terpri)))
(main)
Common Lisp