結果

問題 No.904 サメトロ
ユーザー ducktailducktail
提出日時 2019-10-11 22:12:15
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 13,860 KB
最終ジャッジ日時 2023-08-16 18:14:55
合計ジャッジ時間 2,724 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,856 KB
testcase_01 WA -
testcase_02 AC 18 ms
11,892 KB
testcase_03 WA -
testcase_04 AC 19 ms
11,884 KB
testcase_05 AC 18 ms
11,784 KB
testcase_06 AC 17 ms
11,744 KB
testcase_07 WA -
testcase_08 AC 18 ms
11,692 KB
testcase_09 AC 18 ms
11,768 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 19 ms
11,748 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 18 ms
11,788 KB
testcase_16 WA -
testcase_17 AC 17 ms
11,744 KB
testcase_18 AC 18 ms
11,688 KB
testcase_19 WA -
testcase_20 AC 18 ms
11,672 KB
testcase_21 WA -
testcase_22 AC 18 ms
11,892 KB
testcase_23 WA -
testcase_24 AC 18 ms
11,708 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 18 ms
11,696 KB
testcase_28 AC 17 ms
11,688 KB
testcase_29 AC 18 ms
11,736 KB
testcase_30 WA -
testcase_31 AC 19 ms
11,720 KB
testcase_32 AC 18 ms
11,704 KB
testcase_33 AC 18 ms
11,888 KB
testcase_34 AC 18 ms
11,744 KB
testcase_35 AC 19 ms
11,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (read-list n)
  (cond [(zero? n) '()]
        [else (let* ([a (read)]
                     [b (read)])
                (cons (list a b) (read-list (- n 1))))]))

(define (solve lx)
  (let ([sa (apply + (map car lx))]
        [sb (apply + (map cadr lx))])
    (+ 1 (min sa sb))))

(define (main args)
  (let* ([n (read)]
         [lab (read-list (- n 1))])
    (print (solve lab)))
  0)
0