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