結果

問題 No.32 貯金箱の憂鬱
ユーザー RinRin
提出日時 2015-08-23 21:17:09
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 806 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 13,808 KB
最終ジャッジ日時 2023-09-30 07:53:46
合計ジャッジ時間 1,306 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,800 KB
testcase_01 AC 19 ms
11,672 KB
testcase_02 AC 18 ms
11,660 KB
testcase_03 AC 18 ms
11,824 KB
testcase_04 AC 17 ms
11,656 KB
testcase_05 AC 18 ms
11,880 KB
testcase_06 AC 18 ms
11,712 KB
testcase_07 AC 18 ms
11,708 KB
testcase_08 AC 19 ms
11,676 KB
testcase_09 AC 18 ms
13,808 KB
testcase_10 AC 18 ms
11,708 KB
testcase_11 AC 18 ms
11,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(let (
          (Handred (read (current-input-port)))
          (TwentyFive (read (current-input-port)))
          (One (read (current-input-port)))
      )
     (begin
         (let loop((i One))
             (when (>= i 25)
                 (begin
                     (set! One (- One 25))
                     (set! TwentyFive (+ TwentyFive 1))
                     (loop One)
                 )
            )
        )
        (let loop((i TwentyFive))
            (when (>= i 4)
                (begin
                    (set! TwentyFive (- TwentyFive 4))
                    (set! Handred (+ Handred 1))
                    (loop TwentyFive)
                )
            )
        )
        (set! Handred (modulo Handred 10))
        (display (+ One TwentyFive Handred))
        (newline)
    )
)
0