fdgg
This commit is contained in:
parent
1213a8f0ba
commit
025c3633e7
0
TaskE08/Makefile
Normal file
0
TaskE08/Makefile
Normal file
15
TaskE08/run
Executable file
15
TaskE08/run
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
sciezki = {0:{'0':1,'1':0},1:{'0':2,'1':1},2:{'0':1,'1':2}};
|
||||
stanyakceptujace = [0,2];
|
||||
for input in sys.stdin.readlines():
|
||||
act = 0;
|
||||
for char in input[:-1]:
|
||||
act = sciezki[act][char]
|
||||
if act in stanyakceptujace:
|
||||
print("YES")
|
||||
else:
|
||||
print("NO")
|
Loading…
Reference in New Issue
Block a user