Skip to content

Commit

Permalink
Update judge.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Extra-Creativity authored Apr 24, 2024
1 parent 6c3ae8d commit 6c87f8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ def test(path: str, case: Union[Case, MalformedCase]) -> JudgeResult:

if output_in_memory != case.expect_output:
to_end = True
i = 0
for i in range(min(len(output_in_memory), len(case.expect_output))):
if output_in_memory[i] != case.expect_output[i]:
to_end = False
break

def get_char_or_eof(s, idx):
if to_end and idx + 1 == len(s):
if to_end and idx + 1 >= len(s):
return "<EOF>"
return s[idx]

Expand Down

0 comments on commit 6c87f8c

Please sign in to comment.