Merge branch 'LQDJudge:master' into master

This commit is contained in:
Dung T.Bui 2023-05-16 12:47:53 +07:00 committed by GitHub
commit 49a186f72f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 132 additions and 90 deletions

View file

@ -335,7 +335,9 @@ def get_problem_case(problem, files):
if next_char:
s += next_char
else:
raise Exception("File %s is not able to decode in utf-8" % file)
s = f"File {file} is not able to decode in utf-8"
s = s.encode("utf-8")
break
qs = get_visible_content(s)
cache.set(cache_key, qs, 86400)
result[file] = qs