Cody

# Problem 680. Hack not this Test Suite you will

Solution 193714

Submitted on 19 Jan 2013
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% me=randi(10000); challenger=Good_Luck(1); assert(isequal(me,challenger))

```[Warning: Function /users/msssytem8/assert.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In Good_Luck at 3 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] ```

2   Fail
%% randi(5); randi(5); y=randi(5)+20; rng(y); challenger=Good_Luck(1); if isequal(2,1) while true % Binbin Qi gets a TimeOut end end me=randi(10000); assert(isequal(challenger,me))

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

3   Fail
%% randi(5); y=randi(5)+20; rng(y); me=randi(10000); challenger=Good_Luck(1); assert(me==challenger)

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

4   Fail
%% randi(5); y=randi(5)+20; rng(y); randi(10000); me=randi(10000); challenger=Good_Luck(1); assert(isequal(me,challenger))

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

5   Fail
%% randi(5);randi(5);randi(5); y=randi(5)+20; rng(y); me=randi(10000); challenger=Good_Luck(1); assert(isequal(me,challenger))

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

6   Fail
%% y=randi(5); while y<20 y=y+randi(5); end rng(y); me=randi(10000); challenger=Good_Luck(1); assert(me==challenger)

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

7   Fail
%% rng(24); me=randi(10000); challenger=Good_Luck(1); assert(me==challenger)

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

8   Fail
%% rng(23); randi(10000); me=randi(10000); challenger=Good_Luck(1); assert(me==challenger)

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```

9   Pass
%% challenger=Good_Luck(1); me=randi(10000); assert(challenger==me)

```[Warning: Function /users/msssytem8/assert.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In Good_Luck at 3 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] ```

10   Pass
%% me=randi(10000); challenger=Good_Luck(1); assert(isequal(me,challenger))

```[Warning: Function /users/msssytem8/assert.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In Good_Luck at 3 In verifyCode>evaluateCode at 227 In verifyCode at 40 In fevalJSON at 14] ```

11   Fail
%% rng(25); challenger=Good_Luck(1); me=randi(10000); assert(isequal(me,challenger))

```Error: The current random number generator is the legacy generator. This is because you have executed a command such as rand('state',0), which activates MATLAB's legacy random number behavior. You may not use RNG to reseed the legacy random number generator. Use rng('default') to reinitialize the random number generator to its startup configuration, or call RNG using a specific generator type, such as rng(seed,'twister'). ```