Почернина Ольга, 528 группа ShuffleString 2780 | Михальцов Данила, 528 ShuffleString 3354 | ||||
---|---|---|---|---|---|
t | 1 | s1 = input() | t | 1 | a = input() |
2 | s2 = input() | 2 | b = input() | ||
3 | for n in range(1, len(s1)): | 3 | for n in range(1, len(a)): | ||
4 | s = ''.join([s1[start::n] for start in range(n)]) | 4 | ans = ''.join((a[start::n] for start in range(n))) | ||
5 | if s == s2: | 5 | if b == ans: | ||
6 | print(n) | 6 | print(n) | ||
7 | break | 7 | break | ||
8 | else: | 8 | else: | ||
9 | print('No') | 9 | print('No') |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|