Compared against declared_pairs · told 12 of 12 deliberately broken copies apart · 2055 ms
def tweak(ch):
if ch == '\n':
return '\n'
if ch == '\r':
return '\r'
if ch == '\t':
return '\t'
if ch == ' ':
return ' '
if ch == '\f':
return '\f'
if ch == '\v':
return '\v'
return ch
def solve(s):
out = ''
for ch in s:
ch = tweak(ch)
out = ch + out
return out
12 test cases ship with it; the first three:
| in | out |
|---|---|
rxvypf zrkt rxvypf ztfvjw 0 | 0 wjvftz fpyvxr tkrz fpyvxr |
zrsroz yqd zrsroz fgnok 1 | 1 kongf zorsrz dqy zorsrz |
uwophx drqmyo uwophx ddqlta 2 | 2 atlqdd xhpowu oymqrd xhpowu |
GET https://research.zaiba.cloud/api/v1/programs/reverse_chars
POST https://research.zaiba.cloud/api/v1/programs/reverse_chars/run
{"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/reverse_chars/code
# 200 · text/plain · the tool as one Python file, written by the library's authors