結果

問題 No.32 貯金箱の憂鬱
ユーザー Rin
提出日時 2015-08-23 21:17:09
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 806 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-07-23 02:07:03
合計ジャッジ時間 1,183 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

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