58 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | ||
| id: 5900f39e1000cf542c50feb1
 | ||
| challengeType: 5
 | ||
| title: 'Problem 50: Consecutive prime sum'
 | ||
| videoUrl: ''
 | ||
| localeTitle: 问题50:连续的总和
 | ||
| ---
 | ||
| 
 | ||
| ## Description
 | ||
| <section id="description">素数41可以写成六个连续素数的总和:41 = 2 + 3 + 5 + 7 + 11 + 13这是连续素数的最长和,它加到低于一百的素数。连续素数低于1000的连续素数加上一个素数,包含21个项,等于953.哪个素数低于一百万,可以写成最连续素数的总和? </section>
 | ||
| 
 | ||
| ## Instructions
 | ||
| <section id="instructions">
 | ||
| </section>
 | ||
| 
 | ||
| ## Tests
 | ||
| <section id='tests'>
 | ||
| 
 | ||
| ```yml
 | ||
| tests:
 | ||
|   - text: <code>consecutivePrimeSum(1000)</code>应该返回953。
 | ||
|     testString: 'assert.strictEqual(consecutivePrimeSum(1000), 953, "<code>consecutivePrimeSum(1000)</code> should return 953.");'
 | ||
|   - text: <code>consecutivePrimeSum(1000000)</code>应该返回997651。
 | ||
|     testString: 'assert.strictEqual(consecutivePrimeSum(1000000), 997651, "<code>consecutivePrimeSum(1000000)</code> should return 997651.");'
 | ||
| 
 | ||
| ```
 | ||
| 
 | ||
| </section>
 | ||
| 
 | ||
| ## Challenge Seed
 | ||
| <section id='challengeSeed'>
 | ||
| 
 | ||
| <div id='js-seed'>
 | ||
| 
 | ||
| ```js
 | ||
| function consecutivePrimeSum(limit) {
 | ||
|   // Good luck!
 | ||
|   return true;
 | ||
| }
 | ||
| 
 | ||
| consecutivePrimeSum(1000000);
 | ||
| 
 | ||
| ```
 | ||
| 
 | ||
| </div>
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| </section>
 | ||
| 
 | ||
| ## Solution
 | ||
| <section id='solution'>
 | ||
| 
 | ||
| ```js
 | ||
| // solution required
 | ||
| ```
 | ||
| </section>
 |