| 
									
										
										
										
											2018-09-30 23:01:58 +01:00
										 |  |  |  | --- | 
					
						
							|  |  |  |  | id: 5900f43e1000cf542c50ff50 | 
					
						
							|  |  |  |  | challengeType: 5 | 
					
						
							|  |  |  |  | title: 'Problem 210: Obtuse Angled Triangles' | 
					
						
							| 
									
										
										
										
											2019-08-05 09:17:33 -07:00
										 |  |  |  | forumTopicId: 301852 | 
					
						
							| 
									
										
										
										
											2018-09-30 23:01:58 +01:00
										 |  |  |  | --- | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ## Description
 | 
					
						
							|  |  |  |  | <section id='description'> | 
					
						
							| 
									
										
										
										
											2018-10-08 01:01:53 +01:00
										 |  |  |  | Consider the set S(r) of points (x,y) with integer coordinates satisfying |x| + |y| ≤ r. | 
					
						
							|  |  |  |  | Let O be the point (0,0) and C the point (r/4,r/4). | 
					
						
							| 
									
										
										
										
											2018-09-30 23:01:58 +01:00
										 |  |  |  | Let N(r) be the number of points B in S(r), so that the triangle OBC has an obtuse angle, i.e. the largest angle α satisfies 90°<α<180°. | 
					
						
							|  |  |  |  | So, for example, N(4)=24 and N(8)=100. | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | What is N(1,000,000,000)? | 
					
						
							|  |  |  |  | </section> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ## Instructions
 | 
					
						
							|  |  |  |  | <section id='instructions'> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | </section> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ## Tests
 | 
					
						
							|  |  |  |  | <section id='tests'> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ```yml | 
					
						
							| 
									
										
										
										
											2018-10-04 14:37:37 +01:00
										 |  |  |  | tests: | 
					
						
							|  |  |  |  |   - text: <code>euler210()</code> should return 1598174770174689500. | 
					
						
							| 
									
										
										
										
											2019-07-26 19:26:37 -07:00
										 |  |  |  |     testString: assert.strictEqual(euler210(), 1598174770174689500); | 
					
						
							| 
									
										
										
										
											2018-09-30 23:01:58 +01:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | ``` | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | </section> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ## Challenge Seed
 | 
					
						
							|  |  |  |  | <section id='challengeSeed'> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <div id='js-seed'> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ```js | 
					
						
							|  |  |  |  | function euler210() { | 
					
						
							|  |  |  |  |   // Good luck! | 
					
						
							|  |  |  |  |   return true; | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | euler210(); | 
					
						
							|  |  |  |  | ``` | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | </div> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | </section> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ## Solution
 | 
					
						
							|  |  |  |  | <section id='solution'> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | ```js | 
					
						
							|  |  |  |  | // solution required | 
					
						
							|  |  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2019-07-18 08:24:12 -07:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-30 23:01:58 +01:00
										 |  |  |  | </section> |