結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー MOD9cXWdOsRxvPyMOD9cXWdOsRxvPy
提出日時 2022-09-20 06:02:43
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 244 ms / 3,000 ms
コード長 121 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 5,368 KB
実行使用メモリ 15,452 KB
最終ジャッジ日時 2023-08-23 19:24:03
合計ジャッジ時間 3,696 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
11,864 KB
testcase_01 AC 16 ms
11,872 KB
testcase_02 AC 16 ms
11,632 KB
testcase_03 AC 16 ms
11,652 KB
testcase_04 AC 17 ms
11,512 KB
testcase_05 AC 16 ms
11,660 KB
testcase_06 AC 17 ms
11,876 KB
testcase_07 AC 23 ms
12,748 KB
testcase_08 AC 58 ms
15,388 KB
testcase_09 AC 83 ms
15,372 KB
testcase_10 AC 207 ms
15,360 KB
testcase_11 AC 210 ms
15,348 KB
testcase_12 AC 220 ms
15,452 KB
testcase_13 AC 221 ms
15,440 KB
testcase_14 AC 218 ms
15,420 KB
testcase_15 AC 225 ms
15,320 KB
testcase_16 AC 244 ms
15,444 KB
testcase_17 AC 17 ms
11,888 KB
testcase_18 AC 16 ms
11,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(display 
 (let ([n (read)])
   (let loop ([i 0] [s 0])
     (if (= i n)
	 s
	 (loop (+ i 1) (+ s (read)))))))
(newline)
0