56 lines
1.2 KiB
Markdown
56 lines
1.2 KiB
Markdown
---
|
||
id: 5900f4d41000cf542c50ffe7
|
||
challengeType: 5
|
||
title: 'Problem 360: Scary Sphere'
|
||
videoUrl: ''
|
||
localeTitle: 问题360:可怕的球体
|
||
---
|
||
|
||
## Description
|
||
<section id="description">给定三维空间中的两个点(x1,y1,z1)和(x2,y2,z2),这些点之间的曼哈顿距离定义为| x1-x2 | + | y1-y2 | + | z1-z2 |。 <p>令C(r)为半径为r且在原点O(0,0,0)中心的球体。设I(r)是C(r)表面上具有整数坐标的所有点的集合。设S(r)是I(r)的所有元素与原点O的曼哈顿距离之和。 </p><p>例如S(45)= 34518。 </p><p>找到S(1010)。 </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler360()</code>应该返回878825614395267100。
|
||
testString: 'assert.strictEqual(euler360(), 878825614395267100, "<code>euler360()</code> should return 878825614395267100.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler360() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler360();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|