Spirals
시간 제한: 1000ms메모리 제한: 128MB출처: CCC 2001 SeniorBOJ 6932
문제
A spiral of numbers can start and end with any positive integers less than . Write a program which will accept two positive integers and as input, and output a list of numbers from to inclusive, shown in a spiral. You may assume that the end value is greater than or equal to the start value.
A spiral starts with the first number in the centre. The next number appears immediately below the first number. The spiral continues with the numbers increasing in a counter-clockwise direction until the last number is printed.
예제
예제 1
입력
10 27
출력
27 26 16 15 14 25 17 10 13 24 18 11 12 23 19 20 21 22
예제 2
입력
7 12
출력
12 11 7 10 8 9
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.