Compared against declared_pairs · told 5 of 5 deliberately broken copies apart · 1282 ms
def solve(s):
out = '| line |'
out = out + '\n| --- |'
cur = ''
for ch in s + '\n':
if ch == '\n':
out = out + '\n| ' + cur + ' |'
cur = ''
else:
cur = cur + ch
return out
12 test cases ship with it; the first three:
| in | out |
|---|---|
ziyabl Ppx ziyabl Zed ppx0 apple ygy | | line | | --- | | ziyabl | | Ppx | | ziyabl | | Zed | | ppx0 | | apple | | ygy | |
ywe Admoa ywe Zed admoa1 apple zwi | | line | | --- | | ywe | | Admoa | | ywe | | Zed | | admoa1 | | apple | | zwi | |
smhphw Cxj smhphw Zed cxj2 apple xqipaz | | line | | --- | | smhphw | | Cxj | | smhphw | | Zed | | cxj2 | | apple | | xqipaz | |
GET https://research.zaiba.cloud/api/v1/programs/lines_to_markdown_table
POST https://research.zaiba.cloud/api/v1/programs/lines_to_markdown_table/run
{"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/lines_to_markdown_table/code
# 200 · text/plain · the tool as one Python file, written by the library's authors