This commit is contained in:
Kijowski Michał 2020-12-11 00:33:32 +01:00
parent 1213a8f0ba
commit 025c3633e7
2 changed files with 15 additions and 0 deletions

0
TaskE08/Makefile Normal file
View File

15
TaskE08/run Executable file
View 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")