search and replace ```\n< with ```\n\n< to ensure there's an empty line before closing tags
1.4 KiB
1.4 KiB
id, challengeType, title, videoUrl, localeTitle
| id | challengeType | title | videoUrl | localeTitle |
|---|---|---|---|---|
| 5900f3881000cf542c50fe9b | 5 | Problem 28: Number spiral diagonals | 问题28:对角螺旋数 |
Description
Instructions
Tests
tests:
- text: '<code>spiralDiagonals(101)</code>应该返回692101。'
testString: assert(spiralDiagonals(101) == 692101);
- text: '<code>spiralDiagonals(101)</code>应该返回18591725。'
testString: assert(spiralDiagonals(303) == 18591725);
- text: '<code>spiralDiagonals(101)</code>应该返回85986601。'
testString: assert(spiralDiagonals(505) == 85986601);
- text: '<code>spiralDiagonals(101)</code>应该返回669171001。'
testString: assert(spiralDiagonals(1001) == 669171001);
Challenge Seed
function spiralDiagonals(n) {
// Good luck!
return n;
}
spiralDiagonals(1001);
Solution
// solution required
/section>