
[정올]1707번 달팽이사각형(JAVA)
·
CodingTest/Jungol
0. 문제 링크 https://www.jungol.co.kr/problem/1707 JUNGOL history 최근 본 문제 www.jungol.co.kr 1. 문제 설명 1) 가장 왼쪽 위의 좌표부터 숫자 대입 2) 오른쪽으로 채워나가다가 아래->왼쪽->위->오른쪽 순으로 채우기 2. 입출력 // input 5 // output 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9 3. 코드 import java.util.*; public class jol1707 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(..