結果

問題 No.143 豆
ユーザー go_boardwalkgo_boardwalk
提出日時 2017-03-31 14:19:04
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 383 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2023-09-30 16:58:25
合計ジャッジ時間 1,258 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
11,616 KB
testcase_01 AC 19 ms
11,716 KB
testcase_02 AC 19 ms
11,656 KB
testcase_03 AC 18 ms
11,856 KB
testcase_04 AC 18 ms
11,808 KB
testcase_05 AC 19 ms
11,736 KB
testcase_06 AC 18 ms
11,804 KB
testcase_07 AC 18 ms
11,776 KB
testcase_08 AC 19 ms
11,752 KB
testcase_09 AC 19 ms
11,868 KB
testcase_10 AC 19 ms
11,864 KB
testcase_11 AC 18 ms
11,632 KB
testcase_12 AC 19 ms
11,632 KB
testcase_13 AC 18 ms
11,888 KB
testcase_14 AC 20 ms
11,804 KB
testcase_15 AC 19 ms
11,904 KB
testcase_16 AC 19 ms
11,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define nu (read-line))
(define ns (read-line))

(print ((lambda (b f) (if (>= b f)
                          (- b f)
                          -1))
       (* (list-ref (map string->number (string-split nu " ")) 0)
          (list-ref (map string->number (string-split nu " ")) 1))
       (fold + 0 (map string->number (string-split ns " ")))))

          
                         
0