ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1224. Spiral

WA#13
Posted by Pearl 3 Oct 2018 16:09
I print 2 * (n - 1) when n <= m and 2 * (m - 1) + 1 when n > m but got WA on test 13. What's wrong with my solution?

Oh, I forgot to delete my check for m = 1 (in this case I output 1). This test seem to be
1 1
0

Edited by author 03.10.2018 17:42