https://www.acmicpc.net/problem/2292 2292번: 벌집 위의 그림과 같이 육각형으로 이루어진 벌집이 있다. 그림에서 보는 바와 같이 중앙의 방 1부터 시작해서 이웃하는 방에 돌아가면서 1씩 증가하는 번호를 주소로 매길 수 있다. 숫자 N이 주어졌 www.acmicpc.net 내 풀이 import java.util.Scanner; public class 벌집_2292 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); // 처음엔 6, 12, 18 ... 6씩 증가. int N = scan.nextInt(); int result = 1; int index = 1; int a = 7; ..
코딩테스트

https://www.acmicpc.net/problem/2745 백준에서 가져온 문제입니다. import java.util.Scanner; import java.util.StringTokenizer; public class 색종이_2563 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); StringTokenizer sto; int N = Integer.parseInt(scan.nextLine()); int result = 0; boolean[][] boo = new boolean[100][100]; for(int i=0;i