목록2024/01 (1)
JLOG
[Python]백준 13460 구술탈출2 풀이 / boj 13460 solution
# https://www.acmicpc.net/problem/13460 def move(y, x, dy, dx) : cnt = 0 ny, nx = y, x while (mmap[ny+dy][nx+dx] != "#" and mmap[ny][nx] != "O") : ny += dy nx += dx cnt += 1 return ny, nx, cnt N, M = map(int, input().split(" ")) mmap = [] for w in range(N) : line = input() if line.find('R') != -1 : ry, rx = w, line.find('R') if line.find('B') != -1 : by, bx = w, line.find('B') if line.find('O') ..
Algorithm/알고리즘 풀이
2024. 1. 21. 19:49