문제는 여기! import java.io.*; import java.util.*; public class Main { static int gear[][]; static int d[]; //기어의 회전정보 static int n, m; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; gear = new int[4][8]; for(int i=0; i=0; i--){ if(gear[i][2] != gear[i+1][6]){ d[i] = -d[i+1]; } else { // 회전하지 않으면 ..