結果

問題 No.1229 ラグビーの得点パターン
ユーザー motoshiramotoshira
提出日時 2020-09-21 23:38:02
言語 Common Lisp
(sbcl 2.3.8)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 509 bytes
コンパイル時間 1,107 ms
コンパイル使用メモリ 31,668 KB
実行使用メモリ 26,752 KB
最終ジャッジ日時 2023-09-07 04:01:26
合計ジャッジ時間 2,836 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
22,660 KB
testcase_01 AC 7 ms
22,680 KB
testcase_02 AC 9 ms
24,680 KB
testcase_03 AC 8 ms
22,648 KB
testcase_04 AC 9 ms
22,628 KB
testcase_05 AC 9 ms
22,712 KB
testcase_06 AC 8 ms
22,600 KB
testcase_07 AC 9 ms
24,664 KB
testcase_08 AC 9 ms
26,752 KB
testcase_09 AC 9 ms
26,656 KB
testcase_10 AC 8 ms
22,724 KB
testcase_11 AC 8 ms
22,600 KB
testcase_12 AC 8 ms
22,660 KB
testcase_13 AC 9 ms
26,720 KB
testcase_14 AC 8 ms
22,728 KB
testcase_15 AC 9 ms
24,664 KB
testcase_16 AC 9 ms
24,736 KB
testcase_17 AC 8 ms
22,704 KB
testcase_18 AC 9 ms
22,708 KB
testcase_19 AC 8 ms
22,688 KB
testcase_20 AC 8 ms
26,648 KB
testcase_21 AC 8 ms
22,696 KB
testcase_22 AC 7 ms
22,640 KB
testcase_23 AC 8 ms
22,676 KB
testcase_24 AC 8 ms
24,744 KB
testcase_25 AC 9 ms
26,664 KB
testcase_26 AC 9 ms
22,712 KB
testcase_27 AC 9 ms
26,648 KB
testcase_28 AC 9 ms
24,744 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 07 SEP 2023 04:01:23 AM):
; processing (DEFUN MAIN ...)
; processing (MAIN)

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.076

ソースコード

diff #

(defun main ()
  (let ((n (read)))
    (loop for i from 0 to (floor n 5)
       with res = 0
       do
         (loop for j from 0 to (min i (floor n 2))
            do
              (loop for k from 0 to (floor n 3)
                 do
                   (when (= (+ (* i 5)
                               (* j 2)
                               (* k 3))
                            n)
                     (incf res))))
       finally
         (princ res)
         (fresh-line))))

(main)
0