|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияJust print: 1)2*n-1 2)1 2 ... n 3)n n-1 ... 2 It's work, but why? example 4 1 2 3 4 4 3 2 original 4->3->2->1->2->3->4 They don't meet They meet at the 6th point(3 = 3). Why do you need to print that 1 at the beginning? You don't need it. 2 3 4 4 3 2 also works fine. But 3 2 1 3 2 (or 2 3 4 2 3) is shorter. |
|
|