結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー wagasa2
提出日時 2018-11-11 01:12:29
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 454 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 81,152 KB
最終ジャッジ日時 2024-11-26 08:50:13
合計ジャッジ時間 4,829 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (sum-list lst)
  (define (sum-listx lst ans)
    (if (null? lst) ans
        (sum-listx (cdr lst) (+ ans (car lst)))))
  (sum-listx lst 0))
(define (create-list n)
  (if (= n 0) '()
      (cons (read) (create-list (- n 1)))))
(display (sum-list (create-list (read))))
0