結果
問題 |
No.143 豆
|
ユーザー |
![]() |
提出日時 | 2024-10-08 09:00:34 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 489 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 32,440 KB |
実行使用メモリ | 31,768 KB |
最終ジャッジ日時 | 2024-10-08 09:00:35 |
合計ジャッジ時間 | 1,109 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 6 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 OCT 2024 09:00:34 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.004
ソースコード
; n * k 粒あるので 家族の年齢を引き続け ; 負の値になったら 0 それ以外ならその数を出力する (defun main () (let* ((k (read)) (n (read)) (f (read)) (g (lambda (x) (if (minusp x) 0 x))) (result (* k n))) (dotimes (_ f) (decf result (read))) ; funcall function &rest args => result* ; function を args を引数として実行する (princ (funcall g result)) (terpri))) (main)