結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-10-08 09:01:34 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 1,000 ms |
| コード長 | 491 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 28,032 KB |
| 実行使用メモリ | 22,144 KB |
| 最終ジャッジ日時 | 2026-04-24 15:08:03 |
| 合計ジャッジ時間 | 1,104 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 24 APR 2026 03:08:00 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.003
ソースコード
; n * k 粒あるので 家族の年齢を引き続け
; 負の値になったら -1 それ以外ならその数を出力する
(defun main ()
(let* ((k (read))
(n (read))
(f (read))
(g (lambda (x) (if (minusp x) -1 x)))
(result (* k n)))
(dotimes (_ f)
(decf result (read)))
; funcall function &rest args => result*
; function を args を引数として実行する
(princ (funcall g result))
(terpri)))
(main)
Common Lisp