Кленин Максим Дмитриевич, 418 группа ShuffleString 3057 | Евгений Демидович, 521 группа ShuffleString 2018 | ||||
---|---|---|---|---|---|
t | 1 | a, b = (input(), input()) | t | 1 | orig, conv = (input(), input()) |
2 | for n in range(1, len(a)): | 2 | for i in range(1, len(orig)): | ||
3 | if b == ''.join((a[i::n] for i in range(n))): | 3 | if conv == ''.join((orig[j::i] for j in range(i))): | ||
4 | print(n) | 4 | print(i) | ||
5 | break | 5 | break | ||
6 | else: | 6 | else: | ||
7 | print('No') | 7 | print('No') |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|