[Python] 3197번

체인지영·2021년 4월 1일
0

[Python] 백준

목록 보기
8/12
 1) 백조 만날수 있는지 체크 
 만날수 있으면 ) 날짜 출력 
 not -> 
 	if . 이면 
 		1) 상하좌우 X존재하는지 확인 -> .으로 바꾸기 
    if x 이면 
    	넘어가기 
    
 	) 날짜 1올리기 
 
R , C = map(int, sys.stdin.readline())
l = []
for i in range(R) :
	a = list(sys.stdin.readline())
 	l.append(a)
def check(l): 
	
def changeX(e):

while(1) :
  c = check(l) 
  if c == 1:
      print(date)
      break
  else:
      for i in l:
          for e in i:
              if e == "." or e == "L":
                  l = changeX(e)
              else : 
                  continue
       date += 1
 print(date)
     
profile
Startup, FrontEnd, BlockChain Developer

0개의 댓글