← Back to List

2671번: 잠수함식별 ↗

Solutions

Python 3
140 B | 140 chars
import re
try:
 if re.compile("(100+1+|01)+").fullmatch(input())!=None:
  print("SUBMARINE")
 else:
  print("NOISE")
except:
 print("NOISE")