Description:
merge to java
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r404:e5811929f1d4 - - 1 file changed: 7 inserted, 2 deleted
@@ -175,8 +175,13 | |||
|
175 | 175 | #just set the full score to the total number of test case |
|
176 | 176 | #it is not perfect but works on most normal use case |
|
177 | 177 | def import_full_score(dirname) |
|
178 | - in_file = Dir["#{dirname}/*.in"] | |
|
179 | - full_score =in_file.length * 10 | |
|
178 | + num = 0 | |
|
179 | + loop do | |
|
180 | + num += 1 | |
|
181 | + in_file = Dir["#{dirname}/#{num}*.in"] | |
|
182 | + break if in_file.length == 0 | |
|
183 | + end | |
|
184 | + full_score = (num - 1) * 10 | |
|
180 | 185 | @problem.full_score = full_score |
|
181 | 186 | @problem.save |
|
182 | 187 | return "\nFull score is set to #{full_score}." |
You need to be logged in to leave comments.
Login now