Cody

# Problem 2606. Decrypt the cypher using XOR encryption (for beginners)

Solution 1937192

Submitted on 15 Sep 2019 by Binh Nguyen Cong
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
x=[15 3 22 14 3 0 236 98 39 49 54 98 55 44 98 46 35 44 37 35 37 39 98 38 39 98 42 35 55 54 98 44 43 52 39 35 55]; y_correct=3360; assert(isequal(XOR_cypher(x),y_correct))

2   Pass
x=[29 40 184 57 63 122 186 122 23 27 14 22 27 24 118 122 44 53 47 41 122 42 53 47 44 63 32 122 59 52 59 54 35 41 63 40 122 62 63 41 122 62 53 52 52 179 63 41 116]; y_correct=4783; assert(isequal(XOR_cypher(x),y_correct))

3   Pass
x=[28 33 41 53 54 43 60 35 117 121 47 48 42 44 56 53 48 42 60 35 121 60 45 121 52 54 61 176 53 48 42 60 35 121 47 54 42 121 61 54 55 55 176 60 42 121 56 47 60 58 121 20 24 13 21 24 27 119]; y_correct=5667; assert(isequal(XOR_cypher(x),y_correct))

4   Pass
x=[11 39 50 42 39 36 124 102 42 35 102 42 39 40 33 39 33 35 102 34 51 102 37 39 42 37 51 42 102 53 37 47 35 40 50 47 55 51 35]; y_correct=3666; assert(isequal(XOR_cypher(x),y_correct))

5   Pass
x=[27 36 62 57 58 62 36 34 107 40 35 36 56 34 57 107 6 42 63 39 42 41 107 46 63 107 59 42 56 107 27 50 63 35 36 37 107 116]; y_correct=3547; assert(isequal(XOR_cypher(x),y_correct))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!