# sCTF Q1 2016 - Pesky Permutation

Category: writeupsTags: algorithmic sctf-2016

## Pesky Permutations

Algorithmic - 170 Points

One of my favorite pastimes is solving my Rubik’s Cube. In fact, I’ve fiddled with it so much that I noticed a pattern: If you repeat the same algorithm on the cube, it will eventually return to its original state.

Can you give me the average number of permutations each algorithm in perms.dat takes to return the cube to solved? Round your answer to 2 decimal places and submit without sctf{}.

Good Luck!

### Writeup

I decided to use the Python library PyCuber to solve this challenge and apply every line of moves on a Cube checking every time if it was solved.

This is the script I wrote

After a lot of time and Distributed Computing, we came up with the following sum (rounded):

`140.13`

This is the file with line numbers and moves numbers if you want to check: perm.txt