結果

問題 No.143 豆
ユーザー go_boardwalkgo_boardwalk
提出日時 2017-03-31 14:08:15
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 312 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 5,400 KB
実行使用メモリ 11,900 KB
最終ジャッジ日時 2023-09-30 16:58:23
合計ジャッジ時間 1,578 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,836 KB
testcase_01 AC 18 ms
11,700 KB
testcase_02 AC 18 ms
11,668 KB
testcase_03 AC 18 ms
11,636 KB
testcase_04 AC 18 ms
11,704 KB
testcase_05 AC 18 ms
11,756 KB
testcase_06 AC 18 ms
11,676 KB
testcase_07 AC 18 ms
11,860 KB
testcase_08 AC 19 ms
11,884 KB
testcase_09 AC 18 ms
11,892 KB
testcase_10 AC 19 ms
11,860 KB
testcase_11 AC 19 ms
11,752 KB
testcase_12 AC 19 ms
11,640 KB
testcase_13 AC 18 ms
11,856 KB
testcase_14 AC 18 ms
11,764 KB
testcase_15 AC 18 ms
11,900 KB
testcase_16 AC 18 ms
11,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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