Елфимова Анна, 525 группа IfIf 2866 | Ступеньков Валерий Олегович, 525 группа IfIf 1837 | ||||
---|---|---|---|---|---|
n | n | 1 | import sys | ||
1 | import ast | 2 | import ast | ||
n | 2 | import sys | n | ||
3 | txt = sys.stdin.read() | 3 | text = sys.stdin.read() | ||
4 | try: | 4 | try: | ||
n | 5 | tr = ast.parse(txt) | n | 5 | tree = ast.parse(text) |
6 | res = False | 6 | found = False | ||
7 | for node in ast.walk(tr): | 7 | for node in ast.walk(tree): | ||
8 | if isinstance(node, ast.If): | 8 | if isinstance(node, ast.If): | ||
t | 9 | res = True | t | 9 | found = True |
10 | print(res) | 10 | print(found) | ||
11 | except: | 11 | except: | ||
12 | print(False) | 12 | print(False) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|