結果

問題 No.99 ジャンピング駒
ユーザー RinRin
提出日時 2015-09-03 16:18:16
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 102 ms / 5,000 ms
コード長 410 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 5,324 KB
実行使用メモリ 15,624 KB
最終ジャッジ日時 2023-09-26 02:35:09
合計ジャッジ時間 1,843 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
15,512 KB
testcase_01 AC 98 ms
15,344 KB
testcase_02 AC 98 ms
15,624 KB
testcase_03 AC 97 ms
15,552 KB
testcase_04 AC 95 ms
15,344 KB
testcase_05 AC 97 ms
15,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(let (
      (N (read))
     )
  (let loop(
            (foo (read))
            (Odd 0)
            (Even 0)
           )
    (if (eof-object? foo)
        (System.out.println (abs (- Odd Even)))
        (if (= (modulo foo 2) 0)
            (loop (read) Odd (+ Even 1))
            (loop (read) (+ Odd 1) Even)
        )
    )
  )
)
0