Skip to content

Instantly share code, notes, and snippets.

@lobanov-oleh
Last active December 29, 2020 19:25
Show Gist options
  • Select an option

  • Save lobanov-oleh/1b71ed6df82aa75d7573671bfdc34fe2 to your computer and use it in GitHub Desktop.

Select an option

Save lobanov-oleh/1b71ed6df82aa75d7573671bfdc34fe2 to your computer and use it in GitHub Desktop.
@AleksandraLyashchenco
Copy link

AleksandraLyashchenco commented Dec 29, 2020

import math

b = input()
a = [x for x in b]
n = int(math.sqrt(len(a)))

def enter_cells(a, n):
    cells = []

    for i in range(n):
        cells.append([])
        for j in range(n):
            cells[i].append(a[i * n + j])
    return(cells)

cells = enter_cells(a, n)

def print_cells(cells):
    # тут написать код функции

print_cells(cells)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment