60 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| id: 5900f37f1000cf542c50fe92
 | |
| challengeType: 5
 | |
| title: 'Problem 19: Counting Sundays'
 | |
| videoUrl: ''
 | |
| localeTitle: 'Problema 19: Contando los domingos'
 | |
| ---
 | |
| 
 | |
| ## Description
 | |
| <section id="description"> Se le proporciona la siguiente información, pero es posible que prefiera hacer una investigación por sí mismo. <ul><li> El 1 de enero de 1900 fue un lunes. </li><li> Treinta días tiene septiembre, <br> Abril, junio y noviembre. <br> Todos los demás tienen treinta y uno, <br> Salvando febrero solo, <br> Que tiene veintiocho, llueva o truene. <br> Y en años bisiestos, veintinueve. </li><li> Un año bisiesto ocurre en cualquier año divisible por 4, pero no en un siglo a menos que sea divisible por 400. </li> ¿Cuántos domingos cayeron el primer día del mes durante el siglo veinte (1 de enero de 1901 a 31 de diciembre de 2000)? </ul></section>
 | |
| 
 | |
| ## Instructions
 | |
| <section id="instructions">
 | |
| </section>
 | |
| 
 | |
| ## Tests
 | |
| <section id='tests'>
 | |
| 
 | |
| ```yml
 | |
| tests:
 | |
|   - text: '<code>countingSundays(1943, 1946)</code> debe devolver 6.'
 | |
|     testString: 'assert.strictEqual(countingSundays(1943, 1946), 6, "<code>countingSundays(1943, 1946)</code> should return 6.");'
 | |
|   - text: '<code>countingSundays(1995, 2000)</code> deben devolver 9.'
 | |
|     testString: 'assert.strictEqual(countingSundays(1995, 2000), 9, "<code>countingSundays(1995, 2000)</code> should return 9.");'
 | |
|   - text: '<code>countingSundays(1901, 2000)</code> debe devolver 171.'
 | |
|     testString: 'assert.strictEqual(countingSundays(1901, 2000), 171, "<code>countingSundays(1901, 2000)</code> should return 171.");'
 | |
| 
 | |
| ```
 | |
| 
 | |
| </section>
 | |
| 
 | |
| ## Challenge Seed
 | |
| <section id='challengeSeed'>
 | |
| 
 | |
| <div id='js-seed'>
 | |
| 
 | |
| ```js
 | |
| function countingSundays(firstYear, lastYear) {
 | |
|   // Good luck!
 | |
|   return true;
 | |
| }
 | |
| 
 | |
| countingSundays(1943, 1946);
 | |
| 
 | |
| ```
 | |
| 
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| </section>
 | |
| 
 | |
| ## Solution
 | |
| <section id='solution'>
 | |
| 
 | |
| ```js
 | |
| // solution required
 | |
| ```
 | |
| </section>
 |