Skip to content

Commit 0cd94e0

Browse files
committed
fixed bugs
修复noipstyle中问题
1 parent 7fda05c commit 0cd94e0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cyaron/graders/noipstyle.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ def noipstyle(content, std):
1919
content, std,
2020
'On line {} column {}, read {}, expected {}.'.
2121
format(i + 1, j + 1, content_lines[i][j:j + 5],
22-
std_lines[i][j:j + 5])))
22+
std_lines[i][j:j + 5]), i + 1, j + 1,
23+
content_lines[i][j:j + 5],
24+
std_lines[i][j:j + 5]))
2325
if len(std_lines[i]) > len(content_lines[i]):
24-
return False, TextMismatch(content, std,
25-
'Too short on line {}.'.format(i))
26+
return False, TextMismatch(
27+
content, std, 'Too short on line {}.'.format(i), i + 1,
28+
j + 1, content_lines[i][j:j + 5], std_lines[i][j:j + 5])
2629
if len(std_lines[i]) < len(content_lines[i]):
27-
return False, TextMismatch(content, std,
28-
'Too long on line {}.'.format(i))
30+
return False, TextMismatch(
31+
content, std, 'Too long on line {}.'.format(i), i + 1,
32+
j + 1, content_lines[i][j:j + 5], std_lines[i][j:j + 5])
2933

3034
return True, None

0 commit comments

Comments
 (0)