non-nagative => non-negative
This commit is contained in:
daklqw 2021-04-14 16:53:41 +08:00 committed by GitHub
parent 230738b770
commit 2521b81626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,7 @@
} else { } else {
$n_ex_tests = getUOJConfVal($this->problem_conf, 'n_ex_tests', 0); $n_ex_tests = getUOJConfVal($this->problem_conf, 'n_ex_tests', 0);
if (!validateUInt($n_ex_tests) || $n_ex_tests < 0) { if (!validateUInt($n_ex_tests) || $n_ex_tests < 0) {
throw new UOJProblemConfException("n_ex_tests must be a non-nagative integer"); throw new UOJProblemConfException("n_ex_tests must be a non-negative integer");
} }
for ($num = 1; $num <= $n_ex_tests; $num++) { for ($num = 1; $num <= $n_ex_tests; $num++) {
@ -267,7 +267,7 @@
$n_sample_tests = getUOJConfVal($this->problem_conf, 'n_sample_tests', $n_tests); $n_sample_tests = getUOJConfVal($this->problem_conf, 'n_sample_tests', $n_tests);
if (!validateUInt($n_sample_tests) || $n_sample_tests < 0) { if (!validateUInt($n_sample_tests) || $n_sample_tests < 0) {
throw new UOJProblemConfException("n_sample_tests must be a non-nagative integer"); throw new UOJProblemConfException("n_sample_tests must be a non-negative integer");
} }
if ($n_sample_tests > $n_ex_tests) { if ($n_sample_tests > $n_ex_tests) {
throw new UOJProblemConfException("n_sample_tests can't be greater than n_ex_tests"); throw new UOJProblemConfException("n_sample_tests can't be greater than n_ex_tests");