Skip to content

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
修复noipstyle中问题
  • Loading branch information
himself65 committed Jun 12, 2018
1 parent 7fda05c commit 0cd94e0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cyaron/graders/noipstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ def noipstyle(content, std):
content, std,
'On line {} column {}, read {}, expected {}.'.
format(i + 1, j + 1, content_lines[i][j:j + 5],
std_lines[i][j:j + 5])))
std_lines[i][j:j + 5]), i + 1, j + 1,
content_lines[i][j:j + 5],
std_lines[i][j:j + 5]))
if len(std_lines[i]) > len(content_lines[i]):
return False, TextMismatch(content, std,
'Too short on line {}.'.format(i))
return False, TextMismatch(
content, std, 'Too short on line {}.'.format(i), i + 1,
j + 1, content_lines[i][j:j + 5], std_lines[i][j:j + 5])
if len(std_lines[i]) < len(content_lines[i]):
return False, TextMismatch(content, std,
'Too long on line {}.'.format(i))
return False, TextMismatch(
content, std, 'Too long on line {}.'.format(i), i + 1,
j + 1, content_lines[i][j:j + 5], std_lines[i][j:j + 5])

return True, None

0 comments on commit 0cd94e0

Please sign in to comment.