12 lines
446 B
Python
12 lines
446 B
Python
'''****** Задание ********
|
|
*Редизайн таблицы умножения.
|
|
'''
|
|
m, n = int(input()), int(input())
|
|
for i in range(1, m + 1):
|
|
for j in range(1, m + 1):
|
|
if j != m:
|
|
print(f'{(str(i * j) + " " if n % 2 else str(i * j)).center(n)}|', end='')
|
|
else:
|
|
print(f'{(str(i * j) + " " if n % 2 else str(i * j)).center(n)}')
|
|
if i * j != m * m:
|
|
print(f'{"-"* ((n + 1) * m - 1)}') |