結果

問題 No.143 豆
ユーザー kokoa1046kokoa1046
提出日時 2017-09-04 10:44:53
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 197 bytes
コンパイル時間 29 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 11,924 KB
最終ジャッジ日時 2023-09-30 17:06:45
合計ジャッジ時間 1,391 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
11,756 KB
testcase_01 AC 19 ms
11,692 KB
testcase_02 AC 18 ms
11,656 KB
testcase_03 AC 19 ms
11,724 KB
testcase_04 AC 18 ms
11,860 KB
testcase_05 AC 18 ms
11,564 KB
testcase_06 AC 19 ms
11,516 KB
testcase_07 AC 18 ms
11,696 KB
testcase_08 AC 19 ms
11,852 KB
testcase_09 AC 19 ms
11,924 KB
testcase_10 AC 19 ms
11,704 KB
testcase_11 AC 19 ms
11,748 KB
testcase_12 AC 18 ms
11,760 KB
testcase_13 AC 18 ms
11,648 KB
testcase_14 AC 18 ms
11,696 KB
testcase_15 AC 18 ms
11,716 KB
testcase_16 AC 18 ms
11,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define kn (* (read) (read)))
(define f (read))
(define (readn n)  (if (= n 0) '() (cons (read) (readn (- n 1)) ) ))
(define sum (apply + (readn f)))
(if (< kn sum) (print "-1") (print(- kn sum)))
0