Ксиров Карен СФ PairNumber 8269 | Осипчук Артём Андреевич, 321 группа PairNumber 7180 | ||||
---|---|---|---|---|---|
f | 1 | pairs = set() | f | 1 | pairs = set() |
t | 2 | words = [] | t | 2 | s = [] |
3 | while (input_line := input()): | 3 | while (inp := input()): | ||
4 | words.extend(input_line.split()) | 4 | s.extend(inp.split()) | ||
5 | for i in range(len(words) - 1): | 5 | for i in range(len(s) - 1): | ||
6 | pairs.add(frozenset([words[i], words[i + 1]])) | 6 | pairs.add(frozenset([s[i], s[i + 1]])) | ||
7 | print(len(pairs)) | 7 | print(len(pairs)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|