Cody

Solution 1693243

Submitted on 15 Dec 2018
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   Fail
n=3; x=7; q=2; y_correct = 1; assert(isequal(whatdigit(n,x,q),y_correct))

ans = 7 8 1 2 0 0

Assertion failed.

2   Fail
n=5; x=5; q=3; y_correct = 2; assert(isequal(whatdigit(n,x,q),y_correct))

ans = 5 2 1 3 0

Assertion failed.

3   Fail
n=7; x=7; q=3; y_correct = 3; assert(isequal(whatdigit(n,x,q),y_correct))

ans = 3 4 5 3 2 8 0 0 0 0

Assertion failed.

4   Fail
n=21; x=17; q=18; y_correct = 8; assert(isequal(whatdigit(n,x,q),y_correct))

ans = Columns 1 through 30 1 4 7 4 9 8 1 9 6 1 8 0 5 9 4 2 4 9 1 4 0 0 3 0 0 0 0 0 0 0 Columns 31 through 36 0 0 0 0 0 0

Assertion failed.

5   Fail
n=201; x=123; q=241; y_correct = 7; assert(isequal(whatdigit(n,x,q),y_correct))

ans = Columns 1 through 30 1 0 6 4 4 1 8 6 2 9 0 3 2 2 2 6 1 5 8 8 2 1 6 4 6 1 4 2 9 4 Columns 31 through 60 4 8 9 9 6 1 9 8 3 1 1 8 9 7 4 3 4 6 2 8 9 7 2 1 7 6 4 7 7 5 Columns 61 through 90 8 9 3 9 0 4 1 4 5 7 8 7 3 5 4 9 0 5 3 6 2 9 3 9 4 8 0 8 1 0 Columns 91 through 120 0 10 2 2 5 5 2 0 6 7 9 8 4 9 7 2 0 5 6 5 0 3 1 3 8 4 1 3 4 4 Columns 121 through 150 4 1 5 4 0 9 5 2 8 5 7 7 0 2 9 3 8 3 1 7 2 6 7 3 6 6 1 4 3 2 Columns 151 through 180 2 0 9 6 8 1 4 5 3 4 9 7 4 5 3 5 7 1 2 4 5 7 7 6 8 2 0 5 9 2 Columns 181 through 210 0 7 1 6 7 8 5 3 8 1 4 1 2 5 9 8 4 6 4 6 4 4 2 7 3 6 4 9 8 1 Columns 211 through 240 4 2 9 4 0 4 8 3 4 1 6 3 3 9 9 4 2 3 3 9 1 7 2 2 6 9 2 3 3 4 Columns 241 through 270 2 3 8 5 5 6 4 6 0 1 8 2 8 8 2 1 1 9 8 6 5 6 1 6 5 1 6 7 5 6 Columns 271 through 300 8 7 6 7 1 2 5 0 8 8 3 6 9 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 301 through 330 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 331 through 360 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 361 through 390 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 391 through 420 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 421 through 450 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 451 through 467 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Assertion failed.

6   Pass
n=1; x=1; q=1; y_correct = 1; assert(isequal(whatdigit(n,x,q),y_correct))

ans = 1