結果

問題 No.143 豆
コンテスト
ユーザー kokoa1046
提出日時 2017-09-04 10:44:53
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 17 ms / 1,000 ms
コード長 197 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 72 ms
コンパイル使用メモリ 6,400 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2026-04-03 13:56:42
合計ジャッジ時間 1,092 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(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