1.8 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.8 KiB
		
	
	
	
	
	
	
	
id, challengeType, title, videoUrl, localeTitle
| id | challengeType | title | videoUrl | localeTitle | 
|---|---|---|---|---|
| 5900f37f1000cf542c50fe92 | 5 | Problem 19: Counting Sundays | Problema 19: Contando los domingos | 
Description
- El 1 de enero de 1900 fue un lunes.
-  Treinta días tiene septiembre, 
 Abril, junio y noviembre.
 Todos los demás tienen treinta y uno,
 Salvando febrero solo,
 Que tiene veintiocho, llueva o truene.
 Y en años bisiestos, veintinueve.
- Un año bisiesto ocurre en cualquier año divisible por 4, pero no en un siglo a menos que sea divisible por 400. ¿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)?
Instructions
Tests
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.");'
Challenge Seed
function countingSundays(firstYear, lastYear) {
  // Good luck!
  return true;
}
countingSundays(1943, 1946);
Solution
// solution required