Compared against declared_pairs · told 8 of 8 deliberately broken copies apart · 1608 ms
lo = {'A':'a','B':'b','C':'c','D':'d','E':'e','F':'f','G':'g','H':'h','I':'i','J':'j','K':'k','L':'l','M':'m','N':'n','O':'o','P':'p','Q':'q','R':'r','S':'s','T':'t','U':'u','V':'v','W':'w','X':'x','Y':'y','Z':'z'}
def solve(s):
out = []
cur = ''
for ch in s + ' ':
if ch in lo:
ch = lo[ch]
if ch == ' ' or ch == '\t' or ch == '\n' or ch == '\r':
if cur != '':
out = out + [cur]
cur = ''
else:
cur = cur + ch
return len(set(out))
12 test cases ship with it; the first three:
| in | out |
|---|---|
kyeo tdsj kyeo kyeh 0 | 4 |
smq xryz smq qlteqo 1 | 4 |
baresq eve baresq uxqqgh 2 | 4 |
GET https://research.zaiba.cloud/api/v1/programs/words_unique_count_ci
POST https://research.zaiba.cloud/api/v1/programs/words_unique_count_ci/run
{"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/words_unique_count_ci/code
# 200 · text/plain · the tool as one Python file, written by the library's authors