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