結果
問題 | No.289 数字を全て足そう |
ユーザー | yoza |
提出日時 | 2016-12-11 22:58:02 |
言語 | Vim script (v9.1) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 489 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 5,272 KB |
実行使用メモリ | 6,412 KB |
最終ジャッジ日時 | 2023-08-19 11:37:20 |
合計ジャッジ時間 | 1,573 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
5,660 KB |
testcase_01 | AC | 4 ms
5,628 KB |
testcase_02 | AC | 4 ms
5,676 KB |
testcase_03 | AC | 3 ms
5,672 KB |
testcase_04 | AC | 3 ms
5,624 KB |
testcase_05 | AC | 11 ms
5,908 KB |
testcase_06 | AC | 9 ms
5,812 KB |
testcase_07 | AC | 30 ms
5,868 KB |
testcase_08 | AC | 28 ms
5,908 KB |
testcase_09 | AC | 9 ms
5,816 KB |
testcase_10 | AC | 14 ms
6,000 KB |
testcase_11 | AC | 23 ms
5,892 KB |
testcase_12 | AC | 33 ms
6,312 KB |
testcase_13 | AC | 19 ms
5,948 KB |
testcase_14 | AC | 35 ms
6,376 KB |
testcase_15 | AC | 25 ms
5,932 KB |
testcase_16 | AC | 16 ms
5,920 KB |
testcase_17 | AC | 27 ms
6,108 KB |
testcase_18 | AC | 32 ms
6,356 KB |
testcase_19 | AC | 23 ms
6,048 KB |
testcase_20 | AC | 25 ms
5,988 KB |
testcase_21 | AC | 2 ms
5,640 KB |
testcase_22 | AC | 31 ms
6,388 KB |
testcase_23 | AC | 38 ms
6,412 KB |
ソースコード
function! s:output() let this = {'lines': []} function! this.append(line) abort call add(self.lines, a:line) endfunction function! this.build() abort return join(self.lines, "\n") endfunction return this endfunction function! s:main(input) abort let o = s:output() let r = 0 for c in split(a:input[0], '\zs') let r += str2nr(c) endfor call o.append(r) return o.build() endfunction let s:input = getline(1, '$') enew put =s:main(s:input) 2,$print