結果

問題 No.104 国道
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-02-13 00:01:00
言語 Scheme
(Gauche-0.9.13)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 233 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 5,380 KB
実行使用メモリ 13,860 KB
最終ジャッジ日時 2023-08-28 14:57:25
合計ジャッジ時間 1,398 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
11,676 KB
testcase_01 AC 17 ms
11,660 KB
testcase_02 AC 16 ms
11,852 KB
testcase_03 AC 16 ms
11,868 KB
testcase_04 AC 18 ms
11,888 KB
testcase_05 AC 18 ms
11,844 KB
testcase_06 AC 18 ms
11,736 KB
testcase_07 AC 17 ms
11,840 KB
testcase_08 AC 16 ms
13,860 KB
testcase_09 AC 17 ms
11,728 KB
testcase_10 AC 17 ms
11,664 KB
testcase_11 AC 18 ms
11,652 KB
testcase_12 AC 17 ms
11,652 KB
testcase_13 AC 17 ms
11,756 KB
testcase_14 AC 18 ms
11,872 KB
testcase_15 AC 18 ms
13,668 KB
testcase_16 AC 17 ms
11,760 KB
testcase_17 AC 17 ms
11,656 KB
testcase_18 AC 17 ms
11,652 KB
testcase_19 AC 17 ms
11,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (solve)
    (let ((line (read-line)))
        (fold
            (lambda (ch road) (if (equal? #\L ch) (* 2 road) (+ 1 (* 2 road))))
            1
            (string->list line))))

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