Logo
(追記) (追記ここまで)

6932번 - Spirals 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB151111.111%

문제

A spiral of numbers can start and end with any positive integers less than 100ドル$. Write a program which will accept two positive integers $x$ and $y$ as input, and output a list of numbers from $x$ to $y$ 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

예제 출력 1

 27 26
16 15 14 25
17 10 13 24
18 11 12 23
19 20 21 22

예제 입력 2

7
12

예제 출력 2

12 11
 7 10
 8 9

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2001 > CCC 2001 Junior Division 4번

Olympiad > Canadian Computing Competition & Olympiad > 2001 > CCC 2001 Senior Division 2번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /