728x90 백준(baekjoon)/Python1 [백준(baekjoon)/Python]백준(BaekJoon) 27942 : :danceplant: Python ▶문제 : 27942번: :danceplant: (acmicpc.net) ▶코드작성N=int(input())area=[]for _ in range(N): area.append(list(map(int, input().split())))dx=[N//2-1, N//2] #가지 위치 [왼쪽, 오른쪽]dy=[N//2-1, N//2] #[위쪽, 아래쪽]sum=0text=''left=area[dy[0]][dx[0]-1]+area[dy[1]][dx[0]-1]right=area[dy[0]][dx[1]+1]+area[dy[1]][dx[1]+1]up=area[dy[0]-1][dx[0]]+area[dy[0]-1][dx[1]]down=area[dy[1]+1][dx[0]]+area[dy[1]+1][dx[1]]values=[up.. 2024. 8. 7. 이전 1 다음 728x90