プログラミングのお題スレ Part4
■ このスレッドは過去ログ倉庫に格納されています
0370デフォルトの名無しさん
2014/07/01(火) 23:18:11.17ID:AM6RIy0Rspiral
Build a matrix of numbers, which will be presented in the form of a spiral.
The input is the size of the matrix. Use tabs as a delimeter.
IN
3
OUT
1 2 3
8 9 4
7 6 5
IN
5
OUT
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
■ このスレッドは過去ログ倉庫に格納されています