euler-manager 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (618) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.travis.yml +2 -1
  4. data/README.md +27 -21
  5. data/Rakefile +3 -2
  6. data/config/config.rb +6 -2
  7. data/data/answers.yml +431 -430
  8. data/data/images/{p_015.gif → p015.gif} +0 -0
  9. data/data/images/{p_068_1.gif → p068_1.gif} +0 -0
  10. data/data/images/{p_068_2.gif → p068_2.gif} +0 -0
  11. data/data/images/{p_085.gif → p085.gif} +0 -0
  12. data/data/images/{p_086.gif → p086.gif} +0 -0
  13. data/data/images/{p_090.gif → p090.gif} +0 -0
  14. data/data/images/{p_091_1.gif → p091_1.gif} +0 -0
  15. data/data/images/{p_091_2.gif → p091_2.gif} +0 -0
  16. data/data/images/{p_107_1.gif → p107_1.gif} +0 -0
  17. data/data/images/{p_107_2.gif → p107_2.gif} +0 -0
  18. data/data/images/{p_109.gif → p109.gif} +0 -0
  19. data/data/images/{p_126.gif → p126.gif} +0 -0
  20. data/data/images/{p_128.gif → p128.gif} +0 -0
  21. data/data/images/{p_138.gif → p138.gif} +0 -0
  22. data/data/images/{p_139.gif → p139.gif} +0 -0
  23. data/data/images/{p_143_torricelli.gif → p143_torricelli.gif} +0 -0
  24. data/data/images/{p_144_1.gif → p144_1.gif} +0 -0
  25. data/data/images/{p_144_2.gif → p144_2.gif} +0 -0
  26. data/data/images/{p_147.gif → p147.gif} +0 -0
  27. data/data/images/{p_150.gif → p150.gif} +0 -0
  28. data/data/images/{p_151.gif → p151.gif} +0 -0
  29. data/data/images/{p_152_sum.gif → p152_sum.gif} +0 -0
  30. data/data/images/{p_153_formule1.gif → p153_formule1.gif} +0 -0
  31. data/data/images/{p_153_formule2.gif → p153_formule2.gif} +0 -0
  32. data/data/images/{p_153_formule5.gif → p153_formule5.gif} +0 -0
  33. data/data/images/{p_153_formule6.gif → p153_formule6.gif} +0 -0
  34. data/data/images/{p_154_pyramid.gif → p154_pyramid.gif} +0 -0
  35. data/data/images/{p_155_capacitors1.gif → p155_capacitors1.gif} +0 -0
  36. data/data/images/{p_155_capsform.gif → p155_capsform.gif} +0 -0
  37. data/data/images/{p_155_capsmu.gif → p155_capsmu.gif} +0 -0
  38. data/data/images/{p_161_k9.gif → p161_k9.gif} +0 -0
  39. data/data/images/{p_161_trio1.gif → p161_trio1.gif} +0 -0
  40. data/data/images/{p_161_trio3.gif → p161_trio3.gif} +0 -0
  41. data/data/images/{p_163.gif → p163.gif} +0 -0
  42. data/data/images/{p_173_square_laminas.gif → p173_square_laminas.gif} +0 -0
  43. data/data/images/{p_177_quad.gif → p177_quad.gif} +0 -0
  44. data/data/images/{p_184.gif → p184.gif} +0 -0
  45. data/data/images/{p_189_colours.gif → p189_colours.gif} +0 -0
  46. data/data/images/{p_189_grid.gif → p189_grid.gif} +0 -0
  47. data/data/images/{p_194_Fig.png → p194_Fig.png} +0 -0
  48. data/data/images/{p_194_GraphA.png → p194_GraphA.png} +0 -0
  49. data/data/images/{p_194_GraphB.png → p194_GraphB.png} +0 -0
  50. data/data/images/{p_199_circles_in_circles.gif → p199_circles_in_circles.gif} +0 -0
  51. data/data/images/{p_201_laserbeam.gif → p201_laserbeam.gif} +0 -0
  52. data/data/images/{p_208_robotwalk.gif → p208_robotwalk.gif} +0 -0
  53. data/data/images/{p_215_crackfree.gif → p215_crackfree.gif} +0 -0
  54. data/data/images/{p_220.gif → p220.gif} +0 -0
  55. data/data/images/{p_226_formula.gif → p226_formula.gif} +0 -0
  56. data/data/images/{p_226_scoop2.gif → p226_scoop2.gif} +0 -0
  57. data/data/images/{p_228.png → p228.png} +0 -0
  58. data/data/images/{p_237.gif → p237.gif} +0 -0
  59. data/data/images/{p_244_example.gif → p244_example.gif} +0 -0
  60. data/data/images/{p_244_start.gif → p244_start.gif} +0 -0
  61. data/data/images/{p_244_target.gif → p244_target.gif} +0 -0
  62. data/data/images/{p_246_anim.gif → p246_anim.gif} +0 -0
  63. data/data/images/{p_246_ellipse.gif → p246_ellipse.gif} +0 -0
  64. data/data/images/{p_247_hypersquares.gif → p247_hypersquares.gif} +0 -0
  65. data/data/images/{p_251_cardano.gif → p251_cardano.gif} +0 -0
  66. data/data/images/{p_252_convexhole.gif → p252_convexhole.gif} +0 -0
  67. data/data/images/{p_255_Example.gif → p255_Example.gif} +0 -0
  68. data/data/images/{p_255_Heron.gif → p255_Heron.gif} +0 -0
  69. data/data/images/{p_256_tatami3.gif → p256_tatami3.gif} +0 -0
  70. data/data/images/{p_257_bisector.gif → p257_bisector.gif} +0 -0
  71. data/data/images/{p_262_formula1.gif → p262_formula1.gif} +0 -0
  72. data/data/images/{p_264_TriangleCentres.gif → p264_TriangleCentres.gif} +0 -0
  73. data/data/images/{p_265_BinaryCircles.gif → p265_BinaryCircles.gif} +0 -0
  74. data/data/images/{p_270_CutSquare.gif → p270_CutSquare.gif} +0 -0
  75. data/data/images/{p_275_sculptures2.gif → p275_sculptures2.gif} +0 -0
  76. data/data/images/{p_281_pizza.gif → p281_pizza.gif} +0 -0
  77. data/data/images/{p_282_formula.gif → p282_formula.gif} +0 -0
  78. data/data/images/{p_282formula3.gif → p282formula3.gif} +0 -0
  79. data/data/images/{p_287_quadtree.gif → p287_quadtree.gif} +0 -0
  80. data/data/images/{p_289_euler.gif → p289_euler.gif} +0 -0
  81. data/data/images/{p_291_formula.gif → p291_formula.gif} +0 -0
  82. data/data/images/{p_299_ThreeSimTri.gif → p299_ThreeSimTri.gif} +0 -0
  83. data/data/images/{p_300_protein.gif → p300_protein.gif} +0 -0
  84. data/data/images/{p_306_pstrip.gif → p306_pstrip.gif} +0 -0
  85. data/data/images/{p_309_ladders.gif → p309_ladders.gif} +0 -0
  86. data/data/images/{p_311_biclinic.gif → p311_biclinic.gif} +0 -0
  87. data/data/images/{p_312_sierpinsky8t.gif → p312_sierpinsky8t.gif} +0 -0
  88. data/data/images/{p_312_sierpinskyAt.gif → p312_sierpinskyAt.gif} +0 -0
  89. data/data/images/{p_313_sliding_game_1.gif → p313_sliding_game_1.gif} +0 -0
  90. data/data/images/{p_313_sliding_game_2.gif → p313_sliding_game_2.gif} +0 -0
  91. data/data/images/{p_314_landgrab.gif → p314_landgrab.gif} +0 -0
  92. data/data/images/{p_315_clocks.gif → p315_clocks.gif} +0 -0
  93. data/data/images/{p_316_decexp1.gif → p316_decexp1.gif} +0 -0
  94. data/data/images/{p_316_decexp2.gif → p316_decexp2.gif} +0 -0
  95. data/data/images/{p_316_decexp3.gif → p316_decexp3.gif} +0 -0
  96. data/data/images/{p_321_swapping_counters_1.gif → p321_swapping_counters_1.gif} +0 -0
  97. data/data/images/{p_321_swapping_counters_2.gif → p321_swapping_counters_2.gif} +0 -0
  98. data/data/images/{p_326_formula1.gif → p326_formula1.gif} +0 -0
  99. data/data/images/{p_326_formula2.gif → p326_formula2.gif} +0 -0
  100. data/data/images/{p_327_rooms_of_doom.gif → p327_rooms_of_doom.gif} +0 -0
  101. data/data/images/{p_328_sum1.gif → p328_sum1.gif} +0 -0
  102. data/data/images/{p_328_sum2.gif → p328_sum2.gif} +0 -0
  103. data/data/images/{p_330_formula.gif → p330_formula.gif} +0 -0
  104. data/data/images/{p_331_crossflips1.gif → p331_crossflips1.gif} +0 -0
  105. data/data/images/{p_331_crossflips2.gif → p331_crossflips2.gif} +0 -0
  106. data/data/images/{p_331_crossflips3.gif → p331_crossflips3.gif} +0 -0
  107. data/data/images/{p_332_spherical.jpg → p332_spherical.jpg} +0 -0
  108. data/data/images/{p_332_sum.gif → p332_sum.gif} +0 -0
  109. data/data/images/{p_334_beans.gif → p334_beans.gif} +0 -0
  110. data/data/images/{p_334_cases.gif → p334_cases.gif} +0 -0
  111. data/data/images/{p_334_lfloor.gif → p334_lfloor.gif} +0 -0
  112. data/data/images/{p_334_oplus.gif → p334_oplus.gif} +0 -0
  113. data/data/images/{p_334_rfloor.gif → p334_rfloor.gif} +0 -0
  114. data/data/images/{p_335_mancala.gif → p335_mancala.gif} +0 -0
  115. data/data/images/{p_335_sum.gif → p335_sum.gif} +0 -0
  116. data/data/images/{p_336_maximix.gif → p336_maximix.gif} +0 -0
  117. data/data/images/{p_338_gridpaper.gif → p338_gridpaper.gif} +0 -0
  118. data/data/images/{p_340_formula.gif → p340_formula.gif} +0 -0
  119. data/data/images/{p_344_silverdollar.gif → p344_silverdollar.gif} +0 -0
  120. data/data/images/{p_351_hexorchard.png → p351_hexorchard.png} +0 -0
  121. data/data/images/{p_354_bee_honeycomb.png → p354_bee_honeycomb.png} +0 -0
  122. data/data/images/{p_356_cubicpoly1.gif → p356_cubicpoly1.gif} +0 -0
  123. data/data/images/{p_356_cubicpoly2.gif → p356_cubicpoly2.gif} +0 -0
  124. data/data/images/{p_361_Thue-Morse1.gif → p361_Thue-Morse1.gif} +0 -0
  125. data/data/images/p363_bezier.png +0 -0
  126. data/data/images/{p_364_comf_dist.gif → p364_comf_dist.gif} +0 -0
  127. data/data/images/{p_372_pencilray1.jpg → p372_pencilray1.jpg} +0 -0
  128. data/data/images/{p_372_pencilray2.gif → p372_pencilray2.gif} +0 -0
  129. data/data/images/{p_380_mazes.gif → p380_mazes.gif} +0 -0
  130. data/data/images/{p_384_formula.gif → p384_formula.gif} +0 -0
  131. data/data/images/{p_385_ellipsetriangle.png → p385_ellipsetriangle.png} +0 -0
  132. data/data/images/{p_394_eatpie.gif → p394_eatpie.gif} +0 -0
  133. data/data/images/{p_395_pythagorean.gif → p395_pythagorean.gif} +0 -0
  134. data/data/images/{p_404_c_ellipse.gif → p404_c_ellipse.gif} +0 -0
  135. data/data/images/{p_405_tile1.png → p405_tile1.png} +0 -0
  136. data/data/images/{p_405_tile2.gif → p405_tile2.gif} +0 -0
  137. data/data/images/{p_420_matrix.gif → p420_matrix.gif} +0 -0
  138. data/data/images/{p_424_kakuro1.gif → p424_kakuro1.gif} +0 -0
  139. data/data/images/{p_426_baxball1.gif → p426_baxball1.gif} +0 -0
  140. data/data/images/{p_426_baxball2.gif → p426_baxball2.gif} +0 -0
  141. data/data/images/{p_430_flips.gif → p430_flips.gif} +0 -0
  142. data/data/problems/1.yml +1 -1
  143. data/data/problems/10.yml +6 -4
  144. data/data/problems/100.yml +2 -2
  145. data/data/problems/101.yml +15 -19
  146. data/data/problems/102.yml +9 -10
  147. data/data/problems/103.yml +7 -8
  148. data/data/problems/104.yml +2 -2
  149. data/data/problems/105.yml +4 -4
  150. data/data/problems/106.yml +3 -3
  151. data/data/problems/107.yml +12 -12
  152. data/data/problems/108.yml +8 -14
  153. data/data/problems/109.yml +12 -11
  154. data/data/problems/11.yml +21 -24
  155. data/data/problems/110.yml +9 -10
  156. data/data/problems/111.yml +1 -1
  157. data/data/problems/112.yml +1 -1
  158. data/data/problems/113.yml +1 -1
  159. data/data/problems/114.yml +2 -2
  160. data/data/problems/115.yml +1 -1
  161. data/data/problems/116.yml +11 -11
  162. data/data/problems/117.yml +3 -3
  163. data/data/problems/118.yml +1 -1
  164. data/data/problems/119.yml +1 -1
  165. data/data/problems/12.yml +6 -6
  166. data/data/problems/120.yml +4 -4
  167. data/data/problems/121.yml +1 -1
  168. data/data/problems/122.yml +10 -18
  169. data/data/problems/123.yml +3 -3
  170. data/data/problems/124.yml +17 -19
  171. data/data/problems/125.yml +1 -1
  172. data/data/problems/126.yml +12 -11
  173. data/data/problems/127.yml +8 -8
  174. data/data/problems/128.yml +3 -3
  175. data/data/problems/129.yml +1 -1
  176. data/data/problems/13.yml +1 -1
  177. data/data/problems/130.yml +6 -7
  178. data/data/problems/131.yml +2 -2
  179. data/data/problems/132.yml +2 -2
  180. data/data/problems/133.yml +2 -2
  181. data/data/problems/134.yml +3 -3
  182. data/data/problems/135.yml +3 -3
  183. data/data/problems/136.yml +3 -3
  184. data/data/problems/137.yml +9 -9
  185. data/data/problems/138.yml +5 -5
  186. data/data/problems/139.yml +2 -2
  187. data/data/problems/14.yml +8 -13
  188. data/data/problems/140.yml +5 -5
  189. data/data/problems/141.yml +2 -2
  190. data/data/problems/142.yml +3 -4
  191. data/data/problems/143.yml +3 -3
  192. data/data/problems/144.yml +4 -4
  193. data/data/problems/145.yml +1 -1
  194. data/data/problems/146.yml +1 -1
  195. data/data/problems/147.yml +6 -6
  196. data/data/problems/148.yml +8 -8
  197. data/data/problems/149.yml +12 -25
  198. data/data/problems/15.yml +4 -4
  199. data/data/problems/150.yml +16 -17
  200. data/data/problems/151.yml +3 -3
  201. data/data/problems/152.yml +2 -2
  202. data/data/problems/153.yml +30 -35
  203. data/data/problems/154.yml +16 -12
  204. data/data/problems/155.yml +7 -6
  205. data/data/problems/156.yml +8 -9
  206. data/data/problems/157.yml +4 -6
  207. data/data/problems/158.yml +12 -12
  208. data/data/problems/159.yml +14 -16
  209. data/data/problems/16.yml +1 -1
  210. data/data/problems/160.yml +3 -3
  211. data/data/problems/161.yml +6 -6
  212. data/data/problems/162.yml +3 -3
  213. data/data/problems/163.yml +3 -3
  214. data/data/problems/164.yml +3 -4
  215. data/data/problems/165.yml +12 -12
  216. data/data/problems/166.yml +6 -8
  217. data/data/problems/167.yml +6 -7
  218. data/data/problems/168.yml +5 -7
  219. data/data/problems/169.yml +2 -2
  220. data/data/problems/17.yml +5 -5
  221. data/data/problems/170.yml +9 -10
  222. data/data/problems/171.yml +4 -5
  223. data/data/problems/172.yml +3 -4
  224. data/data/problems/173.yml +2 -2
  225. data/data/problems/174.yml +4 -4
  226. data/data/problems/175.yml +12 -13
  227. data/data/problems/176.yml +1 -1
  228. data/data/problems/177.yml +2 -2
  229. data/data/problems/178.yml +6 -6
  230. data/data/problems/179.yml +4 -4
  231. data/data/problems/18.yml +11 -12
  232. data/data/problems/180.yml +9 -12
  233. data/data/problems/181.yml +1 -1
  234. data/data/problems/182.yml +14 -16
  235. data/data/problems/183.yml +12 -15
  236. data/data/problems/184.yml +3 -3
  237. data/data/problems/185.yml +11 -11
  238. data/data/problems/186.yml +10 -11
  239. data/data/problems/187.yml +8 -8
  240. data/data/problems/188.yml +4 -4
  241. data/data/problems/189.yml +4 -4
  242. data/data/problems/19.yml +1 -1
  243. data/data/problems/190.yml +2 -2
  244. data/data/problems/191.yml +5 -5
  245. data/data/problems/192.yml +10 -14
  246. data/data/problems/193.yml +1 -1
  247. data/data/problems/194.yml +10 -10
  248. data/data/problems/195.yml +5 -6
  249. data/data/problems/196.yml +15 -14
  250. data/data/problems/197.yml +7 -8
  251. data/data/problems/198.yml +8 -14
  252. data/data/problems/199.yml +3 -3
  253. data/data/problems/2.yml +8 -7
  254. data/data/problems/20.yml +4 -9
  255. data/data/problems/200.yml +7 -8
  256. data/data/problems/201.yml +14 -14
  257. data/data/problems/202.yml +2 -2
  258. data/data/problems/203.yml +21 -13
  259. data/data/problems/204.yml +7 -7
  260. data/data/problems/205.yml +6 -6
  261. data/data/problems/206.yml +1 -1
  262. data/data/problems/207.yml +10 -10
  263. data/data/problems/208.yml +4 -5
  264. data/data/problems/209.yml +6 -6
  265. data/data/problems/21.yml +7 -7
  266. data/data/problems/210.yml +6 -6
  267. data/data/problems/211.yml +2 -2
  268. data/data/problems/212.yml +16 -20
  269. data/data/problems/213.yml +6 -6
  270. data/data/problems/214.yml +9 -10
  271. data/data/problems/215.yml +5 -5
  272. data/data/problems/216.yml +5 -6
  273. data/data/problems/217.yml +7 -12
  274. data/data/problems/218.yml +9 -10
  275. data/data/problems/219.yml +5 -5
  276. data/data/problems/22.yml +3 -3
  277. data/data/problems/220.yml +15 -16
  278. data/data/problems/221.yml +8 -8
  279. data/data/problems/222.yml +1 -1
  280. data/data/problems/223.yml +5 -6
  281. data/data/problems/224.yml +5 -6
  282. data/data/problems/225.yml +2 -2
  283. data/data/problems/226.yml +8 -9
  284. data/data/problems/227.yml +3 -3
  285. data/data/problems/228.yml +17 -16
  286. data/data/problems/229.yml +16 -19
  287. data/data/problems/23.yml +1 -3
  288. data/data/problems/230.yml +9 -11
  289. data/data/problems/231.yml +5 -8
  290. data/data/problems/232.yml +1 -1
  291. data/data/problems/233.yml +2 -2
  292. data/data/problems/234.yml +11 -13
  293. data/data/problems/235.yml +2 -2
  294. data/data/problems/236.yml +13 -19
  295. data/data/problems/237.yml +4 -4
  296. data/data/problems/238.yml +16 -19
  297. data/data/problems/239.yml +2 -2
  298. data/data/problems/24.yml +2 -2
  299. data/data/problems/240.yml +7 -7
  300. data/data/problems/241.yml +4 -7
  301. data/data/problems/242.yml +5 -6
  302. data/data/problems/243.yml +13 -13
  303. data/data/problems/244.yml +15 -15
  304. data/data/problems/245.yml +8 -20
  305. data/data/problems/246.yml +11 -12
  306. data/data/problems/247.yml +11 -12
  307. data/data/problems/248.yml +1 -1
  308. data/data/problems/249.yml +2 -2
  309. data/data/problems/25.yml +8 -12
  310. data/data/problems/250.yml +4 -4
  311. data/data/problems/251.yml +4 -4
  312. data/data/problems/252.yml +13 -20
  313. data/data/problems/253.yml +9 -8
  314. data/data/problems/254.yml +3 -3
  315. data/data/problems/255.yml +15 -37
  316. data/data/problems/256.yml +19 -24
  317. data/data/problems/257.yml +8 -10
  318. data/data/problems/258.yml +9 -7
  319. data/data/problems/259.yml +1 -1
  320. data/data/problems/26.yml +11 -11
  321. data/data/problems/260.yml +15 -18
  322. data/data/problems/261.yml +15 -13
  323. data/data/problems/262.yml +15 -14
  324. data/data/problems/263.yml +13 -13
  325. data/data/problems/264.yml +10 -11
  326. data/data/problems/265.yml +2 -2
  327. data/data/problems/266.yml +7 -7
  328. data/data/problems/267.yml +1 -1
  329. data/data/problems/268.yml +1 -1
  330. data/data/problems/269.yml +3 -3
  331. data/data/problems/27.yml +12 -15
  332. data/data/problems/270.yml +4 -4
  333. data/data/problems/271.yml +5 -6
  334. data/data/problems/272.yml +5 -7
  335. data/data/problems/273.yml +4 -4
  336. data/data/problems/274.yml +4 -5
  337. data/data/problems/275.yml +4 -4
  338. data/data/problems/276.yml +5 -6
  339. data/data/problems/277.yml +7 -8
  340. data/data/problems/278.yml +16 -19
  341. data/data/problems/279.yml +3 -4
  342. data/data/problems/28.yml +6 -6
  343. data/data/problems/280.yml +2 -2
  344. data/data/problems/281.yml +4 -6
  345. data/data/problems/282.yml +3 -3
  346. data/data/problems/283.yml +6 -7
  347. data/data/problems/284.yml +7 -8
  348. data/data/problems/285.yml +4 -4
  349. data/data/problems/286.yml +2 -2
  350. data/data/problems/287.yml +19 -24
  351. data/data/problems/288.yml +7 -8
  352. data/data/problems/289.yml +11 -11
  353. data/data/problems/29.yml +10 -13
  354. data/data/problems/290.yml +3 -4
  355. data/data/problems/291.yml +4 -4
  356. data/data/problems/292.yml +5 -6
  357. data/data/problems/293.yml +9 -10
  358. data/data/problems/294.yml +12 -7
  359. data/data/problems/295.yml +11 -13
  360. data/data/problems/296.yml +9 -9
  361. data/data/problems/297.yml +7 -9
  362. data/data/problems/298.yml +32 -40
  363. data/data/problems/299.yml +17 -19
  364. data/data/problems/3.yml +6 -4
  365. data/data/problems/30.yml +1 -1
  366. data/data/problems/300.yml +14 -14
  367. data/data/problems/301.yml +9 -10
  368. data/data/problems/302.yml +5 -5
  369. data/data/problems/303.yml +4 -4
  370. data/data/problems/304.yml +7 -9
  371. data/data/problems/305.yml +4 -5
  372. data/data/problems/306.yml +10 -12
  373. data/data/problems/307.yml +4 -4
  374. data/data/problems/308.yml +4 -4
  375. data/data/problems/309.yml +11 -9
  376. data/data/problems/31.yml +2 -2
  377. data/data/problems/310.yml +6 -9
  378. data/data/problems/311.yml +10 -12
  379. data/data/problems/312.yml +10 -9
  380. data/data/problems/313.yml +5 -5
  381. data/data/problems/314.yml +8 -9
  382. data/data/problems/315.yml +35 -38
  383. data/data/problems/316.yml +17 -16
  384. data/data/problems/317.yml +8 -7
  385. data/data/problems/318.yml +14 -29
  386. data/data/problems/319.yml +10 -12
  387. data/data/problems/32.yml +2 -2
  388. data/data/problems/320.yml +2 -2
  389. data/data/problems/321.yml +12 -11
  390. data/data/problems/322.yml +4 -5
  391. data/data/problems/323.yml +7 -9
  392. data/data/problems/324.yml +7 -9
  393. data/data/problems/325.yml +2 -2
  394. data/data/problems/326.yml +3 -3
  395. data/data/problems/327.yml +19 -22
  396. data/data/problems/328.yml +23 -23
  397. data/data/problems/329.yml +6 -6
  398. data/data/problems/33.yml +2 -2
  399. data/data/problems/330.yml +12 -16
  400. data/data/problems/331.yml +16 -18
  401. data/data/problems/332.yml +10 -10
  402. data/data/problems/333.yml +15 -16
  403. data/data/problems/334.yml +17 -19
  404. data/data/problems/335.yml +3 -3
  405. data/data/problems/336.yml +5 -5
  406. data/data/problems/337.yml +7 -8
  407. data/data/problems/338.yml +18 -24
  408. data/data/problems/339.yml +3 -3
  409. data/data/problems/34.yml +1 -1
  410. data/data/problems/340.yml +7 -7
  411. data/data/problems/341.yml +4 -5
  412. data/data/problems/342.yml +6 -9
  413. data/data/problems/343.yml +8 -13
  414. data/data/problems/344.yml +8 -8
  415. data/data/problems/345.yml +17 -16
  416. data/data/problems/346.yml +6 -6
  417. data/data/problems/347.yml +8 -10
  418. data/data/problems/348.yml +5 -5
  419. data/data/problems/349.yml +4 -4
  420. data/data/problems/35.yml +1 -1
  421. data/data/problems/350.yml +5 -6
  422. data/data/problems/351.yml +7 -7
  423. data/data/problems/352.yml +13 -14
  424. data/data/problems/353.yml +2 -2
  425. data/data/problems/354.yml +6 -8
  426. data/data/problems/355.yml +4 -4
  427. data/data/problems/356.yml +5 -4
  428. data/data/problems/357.yml +3 -3
  429. data/data/problems/358.yml +11 -16
  430. data/data/problems/359.yml +12 -12
  431. data/data/problems/36.yml +1 -1
  432. data/data/problems/360.yml +4 -4
  433. data/data/problems/361.yml +9 -9
  434. data/data/problems/362.yml +8 -15
  435. data/data/problems/363.yml +29 -29
  436. data/data/problems/364.yml +4 -4
  437. data/data/problems/365.yml +3 -3
  438. data/data/problems/366.yml +16 -19
  439. data/data/problems/367.yml +11 -11
  440. data/data/problems/368.yml +14 -18
  441. data/data/problems/369.yml +2 -2
  442. data/data/problems/37.yml +1 -1
  443. data/data/problems/370.yml +4 -4
  444. data/data/problems/371.yml +5 -5
  445. data/data/problems/372.yml +6 -7
  446. data/data/problems/373.yml +10 -6
  447. data/data/problems/374.yml +11 -13
  448. data/data/problems/375.yml +11 -14
  449. data/data/problems/376.yml +19 -19
  450. data/data/problems/377.yml +5 -5
  451. data/data/problems/378.yml +8 -9
  452. data/data/problems/379.yml +10 -9
  453. data/data/problems/38.yml +9 -11
  454. data/data/problems/380.yml +8 -10
  455. data/data/problems/381.yml +6 -10
  456. data/data/problems/382.yml +12 -13
  457. data/data/problems/383.yml +5 -6
  458. data/data/problems/384.yml +14 -18
  459. data/data/problems/385.yml +12 -14
  460. data/data/problems/386.yml +4 -5
  461. data/data/problems/387.yml +13 -14
  462. data/data/problems/388.yml +6 -6
  463. data/data/problems/389.yml +3 -3
  464. data/data/problems/39.yml +2 -2
  465. data/data/problems/390.yml +12 -8
  466. data/data/problems/391.yml +18 -20
  467. data/data/problems/392.yml +9 -9
  468. data/data/problems/393.yml +8 -8
  469. data/data/problems/394.yml +14 -15
  470. data/data/problems/395.yml +16 -15
  471. data/data/problems/396.yml +13 -16
  472. data/data/problems/397.yml +4 -6
  473. data/data/problems/398.yml +8 -9
  474. data/data/problems/399.yml +18 -19
  475. data/data/problems/4.yml +2 -2
  476. data/data/problems/40.yml +2 -2
  477. data/data/problems/400.yml +10 -9
  478. data/data/problems/401.yml +6 -7
  479. data/data/problems/402.yml +7 -9
  480. data/data/problems/403.yml +9 -10
  481. data/data/problems/404.yml +8 -10
  482. data/data/problems/405.yml +10 -10
  483. data/data/problems/406.yml +24 -30
  484. data/data/problems/407.yml +6 -10
  485. data/data/problems/408.yml +10 -10
  486. data/data/problems/409.yml +12 -7
  487. data/data/problems/41.yml +1 -1
  488. data/data/problems/410.yml +5 -6
  489. data/data/problems/411.yml +10 -13
  490. data/data/problems/412.yml +10 -10
  491. data/data/problems/413.yml +6 -7
  492. data/data/problems/414.yml +26 -28
  493. data/data/problems/415.yml +12 -13
  494. data/data/problems/416.yml +4 -4
  495. data/data/problems/417.yml +12 -14
  496. data/data/problems/418.yml +13 -10
  497. data/data/problems/419.yml +11 -13
  498. data/data/problems/42.yml +2 -2
  499. data/data/problems/420.yml +8 -8
  500. data/data/problems/421.yml +8 -13
  501. data/data/problems/422.yml +8 -8
  502. data/data/problems/423.yml +11 -12
  503. data/data/problems/424.yml +10 -10
  504. data/data/problems/425.yml +7 -7
  505. data/data/problems/426.yml +9 -9
  506. data/data/problems/427.yml +12 -13
  507. data/data/problems/428.yml +17 -20
  508. data/data/problems/429.yml +5 -5
  509. data/data/problems/43.yml +1 -1
  510. data/data/problems/430.yml +6 -7
  511. data/data/problems/44.yml +4 -4
  512. data/data/problems/45.yml +4 -4
  513. data/data/problems/46.yml +6 -9
  514. data/data/problems/47.yml +5 -8
  515. data/data/problems/48.yml +1 -1
  516. data/data/problems/49.yml +1 -1
  517. data/data/problems/5.yml +1 -1
  518. data/data/problems/50.yml +1 -1
  519. data/data/problems/51.yml +1 -3
  520. data/data/problems/52.yml +1 -1
  521. data/data/problems/53.yml +6 -12
  522. data/data/problems/54.yml +17 -16
  523. data/data/problems/55.yml +3 -3
  524. data/data/problems/56.yml +2 -2
  525. data/data/problems/57.yml +9 -10
  526. data/data/problems/58.yml +11 -11
  527. data/data/problems/59.yml +2 -2
  528. data/data/problems/6.yml +2 -2
  529. data/data/problems/60.yml +1 -1
  530. data/data/problems/61.yml +7 -7
  531. data/data/problems/62.yml +1 -1
  532. data/data/problems/63.yml +1 -1
  533. data/data/problems/64.yml +30 -44
  534. data/data/problems/65.yml +19 -19
  535. data/data/problems/66.yml +9 -12
  536. data/data/problems/67.yml +9 -9
  537. data/data/problems/68.yml +3 -3
  538. data/data/problems/69.yml +3 -3
  539. data/data/problems/7.yml +1 -1
  540. data/data/problems/70.yml +4 -4
  541. data/data/problems/71.yml +4 -4
  542. data/data/problems/72.yml +4 -4
  543. data/data/problems/73.yml +4 -4
  544. data/data/problems/74.yml +9 -16
  545. data/data/problems/75.yml +3 -3
  546. data/data/problems/76.yml +1 -1
  547. data/data/problems/77.yml +1 -1
  548. data/data/problems/78.yml +8 -8
  549. data/data/problems/79.yml +2 -2
  550. data/data/problems/8.yml +12 -13
  551. data/data/problems/80.yml +1 -1
  552. data/data/problems/81.yml +8 -10
  553. data/data/problems/82.yml +10 -11
  554. data/data/problems/83.yml +10 -11
  555. data/data/problems/84.yml +45 -37
  556. data/data/problems/85.yml +2 -2
  557. data/data/problems/86.yml +8 -8
  558. data/data/problems/87.yml +1 -1
  559. data/data/problems/88.yml +11 -22
  560. data/data/problems/89.yml +14 -14
  561. data/data/problems/9.yml +6 -7
  562. data/data/problems/90.yml +7 -7
  563. data/data/problems/91.yml +6 -8
  564. data/data/problems/92.yml +6 -11
  565. data/data/problems/93.yml +11 -12
  566. data/data/problems/94.yml +1 -1
  567. data/data/problems/95.yml +2 -2
  568. data/data/problems/96.yml +7 -9
  569. data/data/problems/97.yml +3 -3
  570. data/data/problems/98.yml +2 -2
  571. data/data/problems/99.yml +4 -4
  572. data/euler-manager.gemspec +2 -2
  573. data/example/1/README.md +1 -1
  574. data/example/1/ruby/1.rb +7 -1
  575. data/example/1/scala/1.scala +1 -1
  576. data/example/15/README.md +4 -4
  577. data/example/2/README.md +1 -4
  578. data/languages/c.rb +22 -0
  579. data/languages/elixir.rb +25 -0
  580. data/languages/java.rb +3 -2
  581. data/languages/perl.rb +25 -0
  582. data/languages/php.rb +25 -0
  583. data/lib/euler/version.rb +1 -1
  584. data/rake/clean.rake +0 -2
  585. data/rake/sha_answers.rake +20 -0
  586. data/rake/update.rake +5 -2
  587. data/spec/euler_spec.rb +5 -0
  588. data/templates/c.c +11 -0
  589. data/templates/elixir.ex +1 -0
  590. data/templates/perl.pl +3 -0
  591. data/templates/php.php +5 -0
  592. metadata +148 -164
  593. data/data/images/blackdot.gif +0 -0
  594. data/data/images/bracket_left.gif +0 -0
  595. data/data/images/bracket_right.gif +0 -0
  596. data/data/images/sod_13.gif +0 -119
  597. data/data/images/symbol_asymp.gif +0 -0
  598. data/data/images/symbol_cong.gif +0 -0
  599. data/data/images/symbol_ge.gif +0 -0
  600. data/data/images/symbol_gt.gif +0 -0
  601. data/data/images/symbol_implies.gif +0 -0
  602. data/data/images/symbol_lceil.gif +0 -0
  603. data/data/images/symbol_le.gif +0 -0
  604. data/data/images/symbol_lfloor.gif +0 -0
  605. data/data/images/symbol_lt.gif +0 -0
  606. data/data/images/symbol_maps.gif +0 -0
  607. data/data/images/symbol_minus.gif +0 -0
  608. data/data/images/symbol_ne.gif +0 -0
  609. data/data/images/symbol_plusmn.gif +0 -0
  610. data/data/images/symbol_radic.gif +0 -0
  611. data/data/images/symbol_rceil.gif +0 -0
  612. data/data/images/symbol_rfloor.gif +0 -0
  613. data/data/images/symbol_sum.gif +0 -0
  614. data/data/images/symbol_times.gif +0 -0
  615. data/example/1/haskell/1.hs +0 -3
  616. data/example/12/README.md +0 -20
  617. data/example/12/haskell/12.hs +0 -3
  618. data/example/lib/Euler.hs +0 -1
@@ -1,19 +1,17 @@
1
1
  ---
2
2
  :id: 159
3
3
  :name: Digital root sums of factorisations
4
- :url: http://projecteuler.net/problem=159
5
- :content: "A composite number can be factored many different ways. \rFor instance,
6
- not including multiplication by one, 24 can be factored in 7 distinct ways:\n\n\r24
7
- = 2x2x2x3 \n\r24 = 2x3x4 \n\r24 = 2x2x6 \n\r24 = 4x6 \n\r24 = 3x8 \n\r24 =
8
- 2x12 \n\r24 = 24\r\n\nRecall that the digital root of a number, in base 10, is
9
- found by adding together the digits of that number, \rand repeating that process
10
- until a number is arrived at that is less than 10. \rThus the digital root of 467
11
- is 8.\n\nWe shall call a Digital Root Sum (DRS) the sum of the digital roots of
12
- the individual factors of our number. \n\r The chart below demonstrates all of
13
- the DRS values for 24.\n\n| Factorisation | Digital Root Sum |\n| --- | --- |\n|
14
- \n2x2x2x3\n | \n9\n |\n| \n2x3x4\n | \n9\n |\n| \n2x2x6\n | \n10\n |\n| \n4x6\n
15
- | \n10\n |\n| \n3x8\n | \n11\n |\n| \n2x12\n | \n5\n |\n| \n24\n | \n6\n |\n\nThe
16
- maximum Digital Root Sum of 24 is 11. \n\rThe function mdrs(<var>n</var>) gives
17
- the maximum Digital Root Sum of <var>n</var>. So mdrs(24)=11. \n\rFind ![∑]({{
18
- images_dir }}/symbol_sum.gif)mdrs(<var>n</var>) for 1 ![<]({{ images_dir }}/symbol_lt.gif)
19
- <var>n</var> ![<]({{ images_dir }}/symbol_lt.gif) 1,000,000.\n\n"
4
+ :url: https://projecteuler.net/problem=159
5
+ :content: "A composite number can be factored many different ways. For instance, not
6
+ including multiplication by one, 24 can be factored in 7 distinct ways:\n\n24 =
7
+ 2x2x2x3 \n24 = 2x3x4 \n24 = 2x2x6 \n24 = 4x6 \n24 = 3x8 \n24 = 2x12 \n24 =
8
+ 24\n\nRecall that the digital root of a number, in base 10, is found by adding together
9
+ the digits of that number, and repeating that process until a number is arrived
10
+ at that is less than 10. Thus the digital root of 467 is 8.\n\nWe shall call a Digital
11
+ Root Sum (DRS) the sum of the digital roots of the individual factors of our number.
12
+ \ \n The chart below demonstrates all of the DRS values for 24.\n\n| Factorisation
13
+ | Digital Root Sum |\n| --- | --- |\n| \n2x2x2x3\n | \n9\n |\n| \n2x3x4\n | \n9\n
14
+ |\n| \n2x2x6\n | \n10\n |\n| \n4x6\n | \n10\n |\n| \n3x8\n | \n11\n |\n| \n2x12\n
15
+ | \n5\n |\n| \n24\n | \n6\n |\n\nThe maximum Digital Root Sum of 24 is 11. \nThe
16
+ function mdrs(<var>n</var>) gives the maximum Digital Root Sum of <var>n</var>.
17
+ So mdrs(24)=11. \nFind ∑mdrs(<var>n</var>) for 1 \\< <var>n</var> \\< 1,000,000.\n\n"
data/data/problems/16.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 16
3
3
  :name: Power digit sum
4
- :url: http://projecteuler.net/problem=16
4
+ :url: https://projecteuler.net/problem=16
5
5
  :content: |+
6
6
  2<sup>15</sup> = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 160
3
3
  :name: Factorial trailing digits
4
- :url: http://projecteuler.net/problem=160
4
+ :url: https://projecteuler.net/problem=160
5
5
  :content: "For any N, let f(N) be the last five digits before the trailing zeroes
6
- in N!. \n\rFor example,\n\n9! = 362880 so f(9)=36288 \n\r10! = 3628800 so f(10)=36288
7
- \ \n\r20! = 2432902008176640000 so f(20)=17664\n\nFind f(1,000,000,000,000)\n\n"
6
+ in N!. \nFor example,\n\n9! = 362880 so f(9)=36288 \n10! = 3628800 so f(10)=36288
7
+ \ \n20! = 2432902008176640000 so f(20)=17664\n\nFind f(1,000,000,000,000)\n\n"
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  :id: 161
3
3
  :name: Triominoes
4
- :url: http://projecteuler.net/problem=161
5
- :content: "A triomino is a shape consisting of three squares joined via the edges.\rThere
6
- are two basic forms:\n\n![]({{ images_dir }}/p_161_trio1.gif)\n\nIf all possible
7
- orientations are taken into account there are six:\n\n![]({{ images_dir }}/p_161_trio3.gif)\n\nAny
8
- n by m grid for which nxm is divisible by 3 can be tiled with triominoes. \n\rIf
4
+ :url: https://projecteuler.net/problem=161
5
+ :content: "A triomino is a shape consisting of three squares joined via the edges.
6
+ There are two basic forms:\n\n![]({{ images_dir }}/p161_trio1.gif)\n\nIf all possible
7
+ orientations are taken into account there are six:\n\n![]({{ images_dir }}/p161_trio3.gif)\n\nAny
8
+ n by m grid for which nxm is divisible by 3 can be tiled with triominoes. \nIf
9
9
  we consider tilings that can be obtained by reflection or rotation from another
10
10
  tiling as different there are 41 ways a 2 by 9 grid can be tiled with triominoes:\n\n![]({{
11
- images_dir }}/p_161_k9.gif)\n\nIn how many ways can a 9 by 12 grid be tiled in this
11
+ images_dir }}/p161_k9.gif)\n\nIn how many ways can a 9 by 12 grid be tiled in this
12
12
  way by triominoes?\n\n"
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  :id: 162
3
3
  :name: Hexadecimal numbers
4
- :url: http://projecteuler.net/problem=162
4
+ :url: https://projecteuler.net/problem=162
5
5
  :content: "In the hexadecimal number system numbers are represented using 16 different
6
6
  digits:\n\n0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F\n\nThe hexadecimal number AF when written
7
7
  in the decimal number system equals 10x16+15=175.\n\nIn the 3-digit hexadecimal
8
- numbers 10A, 1A0, A10, and A01 the digits 0,1 and A are all present. \n\rLike numbers
8
+ numbers 10A, 1A0, A10, and A01 the digits 0,1 and A are all present. \nLike numbers
9
9
  written in base ten we write hexadecimal numbers without leading zeroes.\n\nHow
10
10
  many hexadecimal numbers containing at most sixteen hexadecimal digits exist with
11
- all of the digits 0,1, and A present at least once? \n\rGive your answer as a hexadecimal
11
+ all of the digits 0,1, and A present at least once? \nGive your answer as a hexadecimal
12
12
  number.\n\n(A,B,C,D,E and F in upper case, without any leading or trailing code
13
13
  that marks the number as hexadecimal and without leading zeroes , e.g. 1A3F and
14
14
  not: 1a3f and not 0x1a3f and not $1A3F and not #1A3F and not 0000001A3F)\n\n"
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  :id: 163
3
3
  :name: Cross-hatched triangles
4
- :url: http://projecteuler.net/problem=163
4
+ :url: https://projecteuler.net/problem=163
5
5
  :content: "Consider an equilateral triangle in which straight lines are drawn from
6
6
  each vertex to the middle of the opposite side, such as in the _size 1_ triangle
7
- in the sketch below.\n\n ![]({{ images_dir }}/p_163.gif)\n\nSixteen triangles of
7
+ in the sketch below.\n\n ![]({{ images_dir }}/p163.gif)\n\nSixteen triangles of
8
8
  either different shape or size or orientation or location can now be observed in
9
9
  that triangle. Using _size 1_ triangles as building blocks, larger triangles can
10
10
  be formed, such as the _size 2_ triangle in the above sketch. One-hundred and four
@@ -13,5 +13,5 @@
13
13
  contains 4 _size 1_ triangle building blocks. A _size 3_ triangle would contain
14
14
  9 _size 1_ triangle building blocks and a _size n_ triangle would thus contain _n<sup>2</sup>
15
15
  size 1_ triangle building blocks.\n\nIf we denote T(<var>n</var>) as the number
16
- of triangles present in a triangle of _size <var>n</var>_, then\n\nT(1) = 16 \n\rT(2)
16
+ of triangles present in a triangle of _size <var>n</var>_, then\n\nT(1) = 16 \nT(2)
17
17
  = 104\n\nFind T(36).\n\n"
@@ -2,7 +2,6 @@
2
2
  :id: 164
3
3
  :name: Numbers for which no three consecutive digits have a sum greater than a given
4
4
  value
5
- :url: http://projecteuler.net/problem=164
6
- :content: |+
7
- How many 20 digit numbers <var>n</var> (without any leading zero) exist such that no three consecutive digits of <var>n</var> have a sum greater than 9?
8
-
5
+ :url: https://projecteuler.net/problem=164
6
+ :content: "How many 20 digit numbers <var>n</var> (without any leading zero) exist
7
+ such that no three consecutive digits of <var>n</var> have a sum greater than 9?\n\n"
@@ -1,29 +1,29 @@
1
1
  ---
2
2
  :id: 165
3
3
  :name: Intersections
4
- :url: http://projecteuler.net/problem=165
4
+ :url: https://projecteuler.net/problem=165
5
5
  :content: "A segment is uniquely defined by its two endpoints. \n By considering
6
- two line segments in plane geometry there are three possibilities: \n \rthe segments
6
+ two line segments in plane geometry there are three possibilities: \n the segments
7
7
  have zero points, one point, or infinitely many points in common.\n\nMoreover when
8
8
  two segments have exactly one point in common it might be the case that that common
9
9
  point is an endpoint of either one of the segments or of both. If a common point
10
10
  of two segments is not an endpoint of either of the segments it is an interior point
11
- of both segments. \n\rWe will call a common point T of two segments L<sub>1</sub>
11
+ of both segments. \nWe will call a common point T of two segments L<sub>1</sub>
12
12
  and L<sub>2</sub> a true intersection point of L<sub>1</sub> and L<sub>2</sub> if
13
13
  T is the only common point of L<sub>1</sub> and L<sub>2</sub> and T is an interior
14
14
  point of both segments.\n\nConsider the three segments L<sub>1</sub>, L<sub>2</sub>,
15
- and L<sub>3</sub>:\n\nL<sub>1</sub>: (27, 44) to (12, 32) \n\rL<sub>2</sub>: (46,
16
- 53) to (17, 62) \n\rL<sub>3</sub>: (46, 70) to (22, 40)\n\nIt can be verified that
15
+ and L<sub>3</sub>:\n\nL<sub>1</sub>: (27, 44) to (12, 32) \nL<sub>2</sub>: (46,
16
+ 53) to (17, 62) \nL<sub>3</sub>: (46, 70) to (22, 40)\n\nIt can be verified that
17
17
  line segments L<sub>2</sub> and L<sub>3</sub> have a true intersection point. We
18
18
  note that as the one of the end points of L<sub>3</sub>: (22,40) lies on L<sub>1</sub>
19
19
  this is not considered to be a true point of intersection. L<sub>1</sub> and L<sub>2</sub>
20
20
  have no common point. So among the three line segments, we find one true intersection
21
21
  point.\n\nNow let us do the same for 5000 line segments. To this end, we generate
22
22
  20000 numbers using the so-called \"Blum Blum Shub\" pseudo-random number generator.\n\ns<sub>0</sub>
23
- = 290797 \n \n \n\rs<sub>n+1</sub> = s<sub>n</sub> ![×]({{ images_dir }}/symbol_times.gif)s<sub>n</sub>
24
- (modulo 50515093) \n \n \n\rt<sub>n</sub> = s<sub>n</sub> (modulo 500)\n\nTo
25
- create each line segment, we use four consecutive numbers t<sub>n</sub>. That is,
26
- the first line segment is given by:\n\n(t<sub>1</sub>, t<sub>2</sub>) to (t<sub>3</sub>,
27
- t<sub>4</sub>)\n\nThe first four numbers computed according to the above generator
28
- should be: 27, 144, 12 and 232. The first segment would thus be (27,144) to (12,232).\n\nHow
29
- many distinct true intersection points are found among the 5000 line segments?\n\n"
23
+ = 290797 \n \ns<sub>n+1</sub> = s<sub>n</subs<sub>n</sub> (modulo 50515093)
24
+ \ \n \nt<sub>n</sub> = s<sub>n</sub> (modulo 500)\n\nTo create each line segment,
25
+ we use four consecutive numbers t<sub>n</sub>. That is, the first line segment is
26
+ given by:\n\n(t<sub>1</sub>, t<sub>2</sub>) to (t<sub>3</sub>, t<sub>4</sub>)\n\nThe
27
+ first four numbers computed according to the above generator should be: 27, 144,
28
+ 12 and 232. The first segment would thus be (27,144) to (12,232).\n\nHow many distinct
29
+ true intersection points are found among the 5000 line segments?\n\n"
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  :id: 166
3
3
  :name: Criss Cross
4
- :url: http://projecteuler.net/problem=166
5
- :content: "A 4x4 grid is filled with digits d, 0 ![]({{ images_dir }}/symbol_le.gif)
6
- d ![≤]({{ images_dir }}/symbol_le.gif) 9.\n\nIt can be seen that in the grid\n\n6
7
- 3 3 0 \n\r5 0 4 3 \n\r0 7 1 4 \n\r1 2 4 5\n\nthe sum of each row and each column
8
- has the value 12. Moreover the sum of each diagonal is also 12.\n\nIn how many ways
9
- can you fill a 4x4 grid with the digits d, 0 ![≤]({{ images_dir }}/symbol_le.gif)
10
- d ![≤]({{ images_dir }}/symbol_le.gif) 9 so that each row, each column, and both
11
- diagonals have the same sum?\n\n"
4
+ :url: https://projecteuler.net/problem=166
5
+ :content: "A 4x4 grid is filled with digits d, 0 ≤ d ≤ 9.\n\nIt can be seen that in
6
+ the grid\n\n6 3 3 0 \n5 0 4 3 \n0 7 1 4 \n1 2 4 5\n\nthe sum of each row and
7
+ each column has the value 12. Moreover the sum of each diagonal is also 12.\n\nIn
8
+ how many ways can you fill a 4x4 grid with the digits d, 0 d 9 so that each
9
+ row, each column, and both diagonals have the same sum?\n\n"
@@ -1,14 +1,13 @@
1
1
  ---
2
2
  :id: 167
3
3
  :name: Investigating Ulam sequences
4
- :url: http://projecteuler.net/problem=167
4
+ :url: https://projecteuler.net/problem=167
5
5
  :content: "For two positive integers a and b, the Ulam sequence U(a,b) is defined
6
- by U(a,b)<sub>1</sub> = a, U(a,b)<sub>2</sub> = b and for k > 2,\rU(a,b)<sub>k</sub>
6
+ by U(a,b)<sub>1</sub> = a, U(a,b)<sub>2</sub> = b and for k \\> 2, U(a,b)<sub>k</sub>
7
7
  is the smallest integer greater than U(a,b)<sub>(k-1)</sub> which can be written
8
8
  in exactly one way as the sum of two distinct previous members of U(a,b).\n\nFor
9
- example, the sequence U(1,2) begins with \n\r1, 2, 3 = 1 + 2, 4 = 1 + 3, 6 = 2
10
- + 4, 8 = 2 + 6, 11 = 3 + 8; \n\r5 does not belong to it because 5 = 1 + 4 = 2 +
11
- 3 has two representations as the sum of two previous members, likewise 7 = 1 + 6
12
- = 3 + 4.\n\nFind ![]({{ images_dir }}/symbol_sum.gif)U(2,2<var>n</var>+1)<sub><var>k</var></sub>
13
- for 2 ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)10,
9
+ example, the sequence U(1,2) begins with \n1, 2, 3 = 1 + 2, 4 = 1 + 3, 6 = 2 +
10
+ 4, 8 = 2 + 6, 11 = 3 + 8; \n5 does not belong to it because 5 = 1 + 4 = 2 + 3 has
11
+ two representations as the sum of two previous members, likewise 7 = 1 + 6 = 3 +
12
+ 4.\n\nFind ∑U(2,2<var>n</var>+1)<sub><var>k</var></sub> for 2 ≤ <var>n</var> ≤10,
14
13
  where <var>k</var> = 10<sup>11</sup>.\n\n"
@@ -1,11 +1,9 @@
1
1
  ---
2
2
  :id: 168
3
3
  :name: Number Rotations
4
- :url: http://projecteuler.net/problem=168
4
+ :url: https://projecteuler.net/problem=168
5
5
  :content: "Consider the number 142857. We can right-rotate this number by moving the
6
- last digit (7) to the front of it, giving us 714285. \n\rIt can be verified that
7
- 714285=5 ![×]({{ images_dir }}/symbol_times.gif)142857. \n\rThis demonstrates an
8
- unusual property of 142857: it is a divisor of its right-rotation.\n\nFind the last
9
- 5 digits of the sum of all integers <var>n</var>, 10 ![<]({{ images_dir }}/symbol_lt.gif)
10
- <var>n</var> ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>100</sup>, that have this
11
- property.\n\n"
6
+ last digit (7) to the front of it, giving us 714285. \nIt can be verified that
7
+ 714285=5×142857. \nThis demonstrates an unusual property of 142857: it is a divisor
8
+ of its right-rotation.\n\nFind the last 5 digits of the sum of all integers <var>n</var>,
9
+ 10 \\< <var>n</var> \\< 10<sup>100</sup>, that have this property.\n\n"
@@ -2,8 +2,8 @@
2
2
  :id: 169
3
3
  :name: Exploring the number of different ways a number can be expressed as a sum of
4
4
  powers of 2
5
- :url: http://projecteuler.net/problem=169
5
+ :url: https://projecteuler.net/problem=169
6
6
  :content: "Define f(0)=1 and f(<var>n</var>) to be the number of different ways <var>n</var>
7
7
  can be expressed as a sum of integer powers of 2 using each power no more than twice.\n\nFor
8
8
  example, f(10)=5 since there are five different ways to express 10:\n\n1 + 1 + 8
9
- \ \n\r1 + 1 + 4 + 4 \n1 + 1 + 2 + 2 + 4 \n\r2 + 4 + 4 \n\r2 + 8\n\nWhat is f(10<sup>25</sup>)?\n\n"
9
+ \ \n1 + 1 + 4 + 4 \n1 + 1 + 2 + 2 + 4 \n2 + 4 + 4 \n2 + 8\n\nWhat is f(10<sup>25</sup>)?\n\n"
data/data/problems/17.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :id: 17
3
3
  :name: Number letter counts
4
- :url: http://projecteuler.net/problem=17
4
+ :url: https://projecteuler.net/problem=17
5
5
  :content: "If the numbers 1 to 5 are written out in words: one, two, three, four,
6
6
  five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.\n\nIf all the
7
7
  numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many
8
- letters would be used?\n\n \n \n\n**NOTE:** Do not count spaces or hyphens. For
9
- example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred
10
- and fifteen) contains 20 letters. The use of \"and\" when writing out numbers is
11
- in compliance with British usage.\n\n"
8
+ letters would be used?\n\n \n\n**NOTE:** Do not count spaces or hyphens. For example,
9
+ 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen)
10
+ contains 20 letters. The use of \"and\" when writing out numbers is in compliance
11
+ with British usage.\n\n"
@@ -1,13 +1,12 @@
1
1
  ---
2
2
  :id: 170
3
3
  :name: Find the largest 0 to 9 pandigital that can be formed by concatenating products
4
- :url: http://projecteuler.net/problem=170
5
- :content: "Take the number 6 and multiply it by each of 1273 and 9854:\n\n6 ![×]({{
6
- images_dir }}/symbol_times.gif) 1273 = 7638 \n\r6 ![×]({{ images_dir }}/symbol_times.gif)
7
- 9854 = 59124\n\nBy concatenating these products we get the 1 to 9 pandigital 763859124.
8
- We will call 763859124 the \"concatenated product of 6 and (1273,9854)\". Notice
9
- too, that the concatenation of the input numbers, 612739854, is also 1 to 9 pandigital.\n\nThe
10
- same can be done for 0 to 9 pandigital numbers.\n\nWhat is the largest 0 to 9 pandigital
11
- 10-digit concatenated product of an integer with two or more other integers, such
12
- that the concatenation of the input numbers is also a 0 to 9 pandigital 10-digit
13
- number?\n\n"
4
+ :url: https://projecteuler.net/problem=170
5
+ :content: "Take the number 6 and multiply it by each of 1273 and 9854:\n\n6 × 1273
6
+ = 7638 \n6 × 9854 = 59124\n\nBy concatenating these products we get the 1 to 9
7
+ pandigital 763859124. We will call 763859124 the \"concatenated product of 6 and
8
+ (1273,9854)\". Notice too, that the concatenation of the input numbers, 612739854,
9
+ is also 1 to 9 pandigital.\n\nThe same can be done for 0 to 9 pandigital numbers.\n\nWhat
10
+ is the largest 0 to 9 pandigital 10-digit concatenated product of an integer with
11
+ two or more other integers, such that the concatenation of the input numbers is
12
+ also a 0 to 9 pandigital 10-digit number?\n\n"
@@ -1,11 +1,10 @@
1
1
  ---
2
2
  :id: 171
3
3
  :name: Finding numbers for which the sum of the squares of the digits is a square
4
- :url: http://projecteuler.net/problem=171
4
+ :url: https://projecteuler.net/problem=171
5
5
  :content: "For a positive integer <var>n</var>, let f(<var>n</var>) be the sum of
6
6
  the squares of the digits (in base 10) of <var>n</var>, e.g.\n\nf(3) = 3<sup>2</sup>
7
- = 9, \n\rf(25) = 2<sup>2</sup> + 5<sup>2</sup> = 4 + 25 = 29, \n\rf(442) = 4<sup>2</sup>
7
+ = 9, \nf(25) = 2<sup>2</sup> + 5<sup>2</sup> = 4 + 25 = 29, \nf(442) = 4<sup>2</sup>
8
8
  + 4<sup>2</sup> + 2<sup>2</sup> = 16 + 16 + 4 = 36\n\nFind the last nine digits
9
- of the sum of all <var>n</var>, 0 ![<]({{ images_dir }}/symbol_lt.gif) <var>n</var>
10
- ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>20</sup>, such that f(<var>n</var>)
11
- is a perfect square.\n\n"
9
+ of the sum of all <var>n</var>, 0 \\< <var>n</var> \\< 10<sup>20</sup>, such that
10
+ f(<var>n</var>) is a perfect square.\n\n"
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  :id: 172
3
3
  :name: Investigating numbers with few repeated digits
4
- :url: http://projecteuler.net/problem=172
5
- :content: |+
6
- How many 18-digit numbers <var>n</var> (without leading zeros) are there such that no digit occurs more than three times in <var>n</var>?
7
-
4
+ :url: https://projecteuler.net/problem=172
5
+ :content: "How many 18-digit numbers <var>n</var> (without leading zeros) are there
6
+ such that no digit occurs more than three times in <var>n</var>?\n\n"
@@ -2,11 +2,11 @@
2
2
  :id: 173
3
3
  :name: Using up to one million tiles how many different "hollow" square laminae can
4
4
  be formed?
5
- :url: http://projecteuler.net/problem=173
5
+ :url: https://projecteuler.net/problem=173
6
6
  :content: |+
7
7
  We shall define a square lamina to be a square outline with a square "hole" so that the shape possesses vertical and horizontal symmetry. For example, using exactly thirty-two square tiles we can form two different square laminae:
8
8
 
9
- ![]({{ images_dir }}/p_173_square_laminas.gif)
9
+ ![]({{ images_dir }}/p173_square_laminas.gif)
10
10
 
11
11
  With one-hundred tiles, and not necessarily using all of the tiles at one time, it is possible to form forty-one different square laminae.
12
12
 
@@ -2,17 +2,17 @@
2
2
  :id: 174
3
3
  :name: Counting the number of "hollow" square laminae that can form one, two, three,
4
4
  ... distinct arrangements
5
- :url: http://projecteuler.net/problem=174
5
+ :url: https://projecteuler.net/problem=174
6
6
  :content: |+
7
7
  We shall define a square lamina to be a square outline with a square "hole" so that the shape possesses vertical and horizontal symmetry.
8
8
 
9
9
  Given eight tiles it is possible to form a lamina in only one way: 3x3 square with a 1x1 hole in the middle. However, using thirty-two tiles it is possible to form two distinct laminae.
10
10
 
11
- ![]({{ images_dir }}/p_173_square_laminas.gif)
11
+ ![]({{ images_dir }}/p173_square_laminas.gif)
12
12
 
13
13
  If <var>t</var> represents the number of tiles used, we shall say that <var>t</var> = 8 is type L(1) and <var>t</var> = 32 is type L(2).
14
14
 
15
- Let N(<var>n</var>) be the number of <var>t</var> ![]({{ images_dir }}/symbol_le.gif) 1000000 such that <var>t</var> is type L(<var>n</var>); for example, N(15) = 832.
15
+ Let N(<var>n</var>) be the number of <var>t</var> ≤ 1000000 such that <var>t</var> is type L(<var>n</var>); for example, N(15) = 832.
16
16
 
17
- What is ![]({{ images_dir }}/symbol_sum.gif) N(<var>n</var>) for 1 ![]({{ images_dir }}/symbol_le.gif) <var>n</var> ![]({{ images_dir }}/symbol_le.gif) 10?
17
+ What is ∑ N(<var>n</var>) for 1 ≤ <var>n</var> ≤ 10?
18
18
 
@@ -2,18 +2,17 @@
2
2
  :id: 175
3
3
  :name: Fractions involving the number of different ways a number can be expressed
4
4
  as a sum of powers of 2
5
- :url: http://projecteuler.net/problem=175
6
- :content: "\rDefine f(0)=1 and f(<var>n</var>) to be the number of ways to write <var>n</var>
7
- as a sum of powers of 2 where no power occurs more than twice. \n \n \n\r\rFor
8
- example, f(10)=5 since there are five different ways to express 10: \n10 = 8+2
9
- = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1 \n \n \n\r\rIt can be shown that for every
10
- fraction <var>p/q</var> (<var>p</var> ![>]({{ images_dir }}/symbol_gt.gif)0, <var>q</var>
11
- ![>]({{ images_dir }}/symbol_gt.gif)0) there exists at least one integer <var>n</var>
12
- such that \n f(<var>n</var>)/f(<var>n</var>-1)=<var>p/q</var>. \n \n \n\rFor
13
- instance, the smallest <var>n</var> for which f(<var>n</var>)/f(<var>n</var>-1)=13/17
14
- is 241. \n\rThe binary expansion of 241 is 11110001. \n\rReading this binary number
5
+ :url: https://projecteuler.net/problem=175
6
+ :content: "\r Define f(0)=1 and f(<var>n</var>) to be the number of ways to write
7
+ <var>n</var> as a sum of powers of 2 where no power occurs more than twice. \n
8
+ \ \nFor example, f(10)=5 since there are five different ways to express 10: \n10
9
+ = 8+2 = 8+1+1 = 4+4+2 = 4+2+2+1+1 = 4+4+1+1 \n \nIt can be shown that for every
10
+ fraction <var>p/q</var> (<var>p</var>\\>0, <var>q</var>\\>0) there exists at least
11
+ one integer <var>n</var> such that \n f(<var>n</var>)/f(<var>n</var>-1)=<var>p/q</var>.
12
+ \ \n \nFor instance, the smallest <var>n</var> for which f(<var>n</var>)/f(<var>n</var>-1)=13/17
13
+ is 241. \nThe binary expansion of 241 is 11110001. \nReading this binary number
15
14
  from the most significant bit to the least significant bit there are 4 one's, 3
16
15
  zeroes and 1 one. We shall call the string 4,3,1 the Shortened Binary Expansion
17
- of 241. \n \n \n\rFind the Shortened Binary Expansion of the smallest <var>n</var>
18
- for which \n f(<var>n</var>)/f(<var>n</var>-1)=123456789/987654321. \n \n \n\rGive
19
- your answer as comma separated integers, without any whitespaces.\r\n"
16
+ of 241. \n \nFind the Shortened Binary Expansion of the smallest <var>n</var>
17
+ for which \n f(<var>n</var>)/f(<var>n</var>-1)=123456789/987654321. \n \nGive
18
+ your answer as comma separated integers, without any whitespaces.\n"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 176
3
3
  :name: Right-angled triangles that share a cathetus
4
- :url: http://projecteuler.net/problem=176
4
+ :url: https://projecteuler.net/problem=176
5
5
  :content: |+
6
6
  The four right-angled triangles with sides (9,12,15), (12,16,20), (5,12,13) and (12,35,37) all have one of the shorter sides (catheti) equal to 12. It can be shown that no other integer sided right-angled triangle exists with one of the catheti equal to 12.
7
7
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :id: 177
3
3
  :name: Integer angled Quadrilaterals
4
- :url: http://projecteuler.net/problem=177
4
+ :url: https://projecteuler.net/problem=177
5
5
  :content: |+
6
6
  Let ABCD be a convex quadrilateral, with diagonals AC and BD. At each vertex the diagonal makes an angle with each of the two sides, creating eight corner angles.
7
7
 
8
- ![]({{ images_dir }}/p_177_quad.gif)
8
+ ![]({{ images_dir }}/p177_quad.gif)
9
9
 
10
10
  For example, at vertex A, the two angles are CAD, CAB.
11
11
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  :id: 178
3
3
  :name: Step Numbers
4
- :url: http://projecteuler.net/problem=178
5
- :content: "\rConsider the number 45656. \n\rIt can be seen that each pair of consecutive
6
- digits of 45656 has a difference of one. \n\rA number for which every pair of consecutive
7
- digits has a difference of one is called a step number. \n\rA pandigital number
8
- contains every decimal digit from 0 to 9 at least once. \n\r\rHow many pandigital
9
- step numbers less than 10<sup>40</sup> are there?\r\r\n"
4
+ :url: https://projecteuler.net/problem=178
5
+ :content: "\r Consider the number 45656. \nIt can be seen that each pair of consecutive
6
+ digits of 45656 has a difference of one. \nA number for which every pair of consecutive
7
+ digits has a difference of one is called a step number. \nA pandigital number contains
8
+ every decimal digit from 0 to 9 at least once. \nHow many pandigital step numbers
9
+ less than 10<sup>40</sup> are there?\n"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 179
3
3
  :name: Consecutive positive divisors
4
- :url: http://projecteuler.net/problem=179
5
- :content: |+
6
- Find the number of integers 1 ![<]({{ images_dir }}/symbol_lt.gif) n ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>7</sup>, for which <var>n</var> and <var>n</var> + 1 have the same number of positive divisors. For example, 14 has the positive divisors 1, 2, 7, 14 while 15 has 1, 3, 5, 15.
7
-
4
+ :url: https://projecteuler.net/problem=179
5
+ :content: "Find the number of integers 1 \\< n \\< 10<sup>7</sup>, for which <var>n</var>
6
+ and <var>n</var> + 1 have the same number of positive divisors. For example, 14
7
+ has the positive divisors 1, 2, 7, 14 while 15 has 1, 3, 5, 15.\n\n"
data/data/problems/18.yml CHANGED
@@ -1,17 +1,16 @@
1
1
  ---
2
2
  :id: 18
3
3
  :name: Maximum path sum I
4
- :url: http://projecteuler.net/problem=18
4
+ :url: https://projecteuler.net/problem=18
5
5
  :content: "By starting at the top of the triangle below and moving to adjacent numbers
6
6
  on the row below, the maximum total from top to bottom is 23.\n\n**3** \n**7**
7
- 4 \n\r2 **4** 6 \n\r8 5 **9** 3\n\nThat is, 3 + 7 + 4 + 9 = 23.\n\nFind the maximum
8
- total from top to bottom of the triangle below:\n\n75 \n\r95 64 \n\r17 47 82 \n\r18
9
- 35 87 10 \n\r20 04 82 47 65 \n\r19 01 23 75 03 34 \n\r88 02 77 73 07 63 67 \n\r99
10
- 65 04 28 06 16 70 92 \n\r41 41 26 56 83 40 80 70 33 \n\r41 48 72 33 47 32 37 16
11
- 94 29 \n\r53 71 44 65 25 43 91 52 97 51 14 \n\r70 11 33 28 77 73 17 78 39 68 17
12
- 57 \n\r91 71 52 38 17 14 91 43 58 50 27 29 48 \n\r63 66 04 68 89 53 67 30 73 16
13
- 69 87 40 31 \n\r04 62 98 27 23 09 70 98 73 93 38 53 60 04 23\n\n**NOTE:** As there
14
- are only 16384 routes, it is possible to solve this problem by trying every route.
15
- However, [Problem 67](problem=67), is the same challenge with a triangle containing
16
- one-hundred rows; it cannot be solved by brute force, and requires a clever method!
17
- ;o)\n\n"
7
+ 4 \n2 **4** 6 \n8 5 **9** 3\n\nThat is, 3 + 7 + 4 + 9 = 23.\n\nFind the maximum
8
+ total from top to bottom of the triangle below:\n\n75 \n95 64 \n17 47 82 \n18
9
+ 35 87 10 \n20 04 82 47 65 \n19 01 23 75 03 34 \n88 02 77 73 07 63 67 \n99 65
10
+ 04 28 06 16 70 92 \n41 41 26 56 83 40 80 70 33 \n41 48 72 33 47 32 37 16 94 29
11
+ \ \n53 71 44 65 25 43 91 52 97 51 14 \n70 11 33 28 77 73 17 78 39 68 17 57 \n91
12
+ 71 52 38 17 14 91 43 58 50 27 29 48 \n63 66 04 68 89 53 67 30 73 16 69 87 40 31
13
+ \ \n04 62 98 27 23 09 70 98 73 93 38 53 60 04 23\n\n**NOTE:** As there are only
14
+ 16384 routes, it is possible to solve this problem by trying every route. However,
15
+ [Problem 67](problem=67), is the same challenge with a triangle containing one-hundred
16
+ rows; it cannot be solved by brute force, and requires a clever method! ;o)\n\n"