Назаренко Глеб 622 группа PairNumber 7760 | Байдецкая Марина 319/2 PairNumber 9286 | ||||
---|---|---|---|---|---|
t | 1 | seq = [] | t | 1 | slova = [] |
2 | while (s := input()): | 2 | while (strk := input()): | ||
3 | seq += s.split() | 3 | slova += strk.split() | ||
4 | result = set() | 4 | unik = set() | ||
5 | for i in range(len(seq) - 1): | 5 | for i in range(len(slova) - 1): | ||
6 | result.add(frozenset((seq[i], seq[i + 1]))) | 6 | unik.add(frozenset((slova[i], slova[i + 1]))) | ||
7 | print(len(result)) | 7 | print(len(unik)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|