mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Update grader
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
int nonce; // For random input
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
int p = 2;
|
||||
int q = 5;
|
||||
int r = (0 ? ((p > q) ? (p -= 2) : (p += 2)) : (p + q));
|
||||
int loop_num = nonce % 100;
|
||||
|
||||
for (i = 0; i < 11; ((i % 2) ? (i += 2) : ++i)) {
|
||||
for (i = 0; i < loop_num; ((i % 2) ? (i += 2) : ++i)) {
|
||||
if (i % 2) { p += q; }
|
||||
else { p += r; }
|
||||
}
|
||||
|
||||
return p == 34;
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
int nonce; // For random input
|
||||
|
||||
int fibonacci(int n) {
|
||||
if (n < 2) {
|
||||
return n;
|
||||
@@ -7,5 +9,6 @@ int fibonacci(int n) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
return fibonacci(9) == 34;
|
||||
int number = nonce % 20;
|
||||
return fibonacci(number);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
int nonce; // For random input
|
||||
int g = 10;
|
||||
|
||||
int foo(int, int k);
|
||||
@@ -5,9 +6,9 @@ int foo(int, int k);
|
||||
int main() {
|
||||
int i = g;
|
||||
|
||||
return foo(i, i) == 30;
|
||||
return foo(i, i);
|
||||
}
|
||||
|
||||
int foo(int i, int j) {
|
||||
return i + j + g;
|
||||
return i + j + nonce;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
int nonce; // For random input
|
||||
|
||||
int main()
|
||||
{
|
||||
int x = 1;
|
||||
return 1;
|
||||
int x = nonce;
|
||||
return x;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
int nonce; // For random input
|
||||
|
||||
int foo() {
|
||||
int sum = 0;
|
||||
int i = 0;
|
||||
int continue_num = nonce % 98;
|
||||
|
||||
while(i < 10) {
|
||||
if(i == 3) {
|
||||
while(i < 100) {
|
||||
if(i == continue_num) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
sum += i;
|
||||
i++;
|
||||
|
||||
if(i == 5) break;
|
||||
if(i == continue_num + 2) break;
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
int main() {
|
||||
return foo() == 7;
|
||||
return foo();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user