結果
問題 |
No.143 豆
|
ユーザー |
![]() |
提出日時 | 2024-10-08 09:01:34 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
AC
|
実行時間 | 16 ms / 1,000 ms |
コード長 | 491 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 32,580 KB |
実行使用メモリ | 29,888 KB |
最終ジャッジ日時 | 2024-10-08 09:01:35 |
合計ジャッジ時間 | 1,130 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 OCT 2024 09:01:34 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.004
ソースコード
; 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)