Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Cipher Map by mikra
from itertools import product
def grille_to_coords(grille):
return [
(i, j) for i, j in product(range(4), range(4)) if grille[i][j] == 'X'
]
def rotations(coords):
for _ in range(4):
yield coords
coords = sorted((j, 3 - i) for i, j in coords)
def recall_password(cipher_grille, ciphered_password):
coords = grille_to_coords(cipher_grille)
return ''.join(
ciphered_password[i][j] for rot in rotations(coords) for i, j in rot
)
April 7, 2019
Comments: