結果

問題 No.99 ジャンピング駒
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-02-12 23:52:07
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 157 ms / 5,000 ms
コード長 317 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 28,008 KB
最終ジャッジ日時 2023-08-28 14:56:58
合計ジャッジ時間 2,204 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
28,008 KB
testcase_01 AC 157 ms
27,812 KB
testcase_02 AC 153 ms
28,004 KB
testcase_03 AC 157 ms
27,840 KB
testcase_04 AC 154 ms
27,852 KB
testcase_05 AC 154 ms
27,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (solve)
    (let* ((n (string->number (read-line)))
           (numbers (map string->number (string-split (read-line) #\space))))
        (let ((odd-cnt (count odd? numbers))
              (even-cnt (count even? numbers)))
            (abs (- odd-cnt even-cnt)))))

(begin
    (display (solve))
    (newline))
0