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,21 +1,22 @@
1
1
  ---
2
2
  :id: 345
3
3
  :name: Matrix Sum
4
- :url: http://projecteuler.net/problem=345
4
+ :url: https://projecteuler.net/problem=345
5
5
  :content: "We define the Matrix Sum of a matrix as the maximum sum of matrix elements
6
6
  with each element being the only one in his row and column. For example, the Matrix
7
- Sum of the matrix below equals 3315 ( = 863 + 383 + 343 + 959 + 767):\n\n  7  53
8
- 183 439 **863** \n\r497 **383** 563  79 973 \n\r287  63 **343** 169 583 \n\r627
9
- 343 773 **959** 943 \n**767** 473 103 699 303\n\nFind the Matrix Sum of:\n\n  7
10
-  53 183 439 863 497 383 563  79 973 287  63 343 169 583 \n\r627 343 773 959 943
11
- 767 473 103 699 303 957 703 583 639 913 \n\r447 283 463  29  23 487 463 993 119
12
- 883 327 493 423 159 743 \n\r217 623   3 399 853 407 103 983  89 463 290 516 212
13
- 462 350 \n\r960 376 682 962 300 780 486 502 912 800 250 346 172 812 350 \n\r870
14
- 456 192 162 593 473 915  45 989 873 823 965 425 329 803 \n\r973 965 905 919 133
15
- 673 665 235 509 613 673 815 165 992 326 \n\r322 148 972 962 286 255 941 541 265
16
- 323 925 281 601  95 973 \n\r445 721  11 525 473  65 511 164 138 672  18 428 154
17
- 448 848 \n\r414 456 310 312 798 104 566 520 302 248 694 976 430 392 198 \n\r184
18
- 829 373 181 631 101 969 613 840 740 778 458 284 760 390 \n\r821 461 843 513  17
19
- 901 711 993 293 157 274  94 192 156 574 \n\r 34 124   4 878 450 476 712 914 838
20
- 669 875 299 823 329 699 \n\r815 559 813 459 522 788 168 586 966 232 308 833 251
21
- 631 107 \n\r813 883 451 509 615  77 281 613 459 205 380 274 302  35 805\n\n"
7
+ Sum of the matrix below equals 3315 ( = 863 + 383 + 343 + 959 + 767):\n\n  7
8
+  53 183 439 **863** \n497 **383** 563  79 973 \n287  63 **343**
9
+ 169 583 \n627 343 773 **959** 943 \n**767** 473 103 699 303\n\nFind the Matrix
10
+ Sum of:\n\n  7  53 183 439 863 497 383 563  79 973 287  63
11
+ 343 169 583 \n627 343 773 959 943 767 473 103 699 303 957 703 583 639 913 \n447
12
+ 283 463  29  23 487 463 993 119 883 327 493 423 159 743 \n217 623   3
13
+ 399 853 407 103 983  89 463 290 516 212 462 350 \n960 376 682 962 300 780
14
+ 486 502 912 800 250 346 172 812 350 \n870 456 192 162 593 473 915  45 989
15
+ 873 823 965 425 329 803 \n973 965 905 919 133 673 665 235 509 613 673 815 165 992
16
+ 326 \n322 148 972 962 286 255 941 541 265 323 925 281 601  95 973 \n445 721
17
+  11 525 473  65 511 164 138 672  18 428 154 448 848 \n414 456 310
18
+ 312 798 104 566 520 302 248 694 976 430 392 198 \n184 829 373 181 631 101 969 613
19
+ 840 740 778 458 284 760 390 \n821 461 843 513  17 901 711 993 293 157 274
20
+  94 192 156 574 \n 34 124   4 878 450 476 712 914 838 669 875
21
+ 299 823 329 699 \n815 559 813 459 522 788 168 586 966 232 308 833 251 631 107 \n813
22
+ 883 451 509 615  77 281 613 459 205 380 274 302  35 805\n\n"
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :id: 346
3
3
  :name: Strong Repunits
4
- :url: http://projecteuler.net/problem=346
4
+ :url: https://projecteuler.net/problem=346
5
5
  :content: "The number 7 is special, because 7 is 111 written in base 2, and 11 written
6
6
  in base 6 \n(i.e. 7<sub>10</sub> = 11<sub>6</sub> = 111<sub>2</sub>). In other
7
- words, 7 is a repunit in at least two bases b > 1.\n\nWe shall call a positive integer
8
- with this property a strong repunit. It can be verified that there are 8 strong
9
- repunits below 50: {1,7,13,15,21,31,40,43}. \nFurthermore, the sum of all strong
10
- repunits below 1000 equals 15864.\n\n\rFind the sum of all strong repunits below
11
- 10<sup>12</sup>.\r\r\r\r\n"
7
+ words, 7 is a repunit in at least two bases b \\> 1.\n\nWe shall call a positive
8
+ integer with this property a strong repunit. It can be verified that there are 8
9
+ strong repunits below 50: {1,7,13,15,21,31,40,43}. \nFurthermore, the sum of all
10
+ strong repunits below 1000 equals 15864.\n\nFind the sum of all strong repunits
11
+ below 10<sup>12</sup>.\n"
@@ -1,13 +1,11 @@
1
1
  ---
2
2
  :id: 347
3
3
  :name: Largest integer divisible by two primes
4
- :url: http://projecteuler.net/problem=347
5
- :content: "The largest integer ![]({{ images_dir }}/symbol_le.gif) 100 that is only
6
- divisible by both the primes 2 and 3 is 96, as 96=32\\*3=2<sup>5</sup>\\*3.\rFor
7
- two _distinct_ primes p and q let M(p,q,N) be the largest positive integer ![≤]({{
8
- images_dir }}/symbol_le.gif)N only divisible\rby both p and q and M(p,q,N)=0 if
9
- such a positive integer does not exist.\n\nE.g. M(2,3,100)=96. \n \rM(3,5,100)=75
10
- and not 90 because 90 is divisible by 2 ,3 and 5. \n\rAlso M(2,73,100)=0 because
11
- there does not exist a positive integer ![≤]({{ images_dir }}/symbol_le.gif) 100
12
- that is divisible by both 2 and 73.\n\nLet S(N) be the sum of all distinct M(p,q,N).\rS(100)=2262.\n\nFind
13
- S(10 000 000).\n\n"
4
+ :url: https://projecteuler.net/problem=347
5
+ :content: "The largest integer ≤ 100 that is only divisible by both the primes 2 and
6
+ 3 is 96, as 96=32\\*3=2<sup>5</sup>\\*3. For two _distinct_ primes p and q let M(p,q,N)
7
+ be the largest positive integer ≤N only divisible by both p and q and M(p,q,N)=0
8
+ if such a positive integer does not exist.\n\nE.g. M(2,3,100)=96. \n M(3,5,100)=75
9
+ and not 90 because 90 is divisible by 2 ,3 and 5. \nAlso M(2,73,100)=0 because
10
+ there does not exist a positive integer ≤ 100 that is divisible by both 2 and 73.\n\nLet
11
+ S(N) be the sum of all distinct M(p,q,N). S(100)=2262.\n\nFind S(10 000 000).\n\n"
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :id: 348
3
3
  :name: Sum of a square and a cube
4
- :url: http://projecteuler.net/problem=348
4
+ :url: https://projecteuler.net/problem=348
5
5
  :content: "Many numbers can be expressed as the sum of a square and a cube. Some of
6
6
  them in more than one way.\n\nConsider the palindromic numbers that can be expressed
7
7
  as the sum of a square and a cube, both greater than 1, in **exactly** 4 different
8
- ways. \n\rFor example, 5229225 is a palindromic number and it can be expressed
9
- in exactly 4 different ways:\n\n2285<sup>2</sup> + 20<sup>3</sup> \n\r2223<sup>2</sup>
10
- + 66<sup>3</sup> \n\r1810<sup>2</sup> + 125<sup>3</sup> \n\r1197<sup>2</sup> +
11
- 156<sup>3</sup>\n\nFind the sum of the five smallest such palindromic numbers.\n\n"
8
+ ways. \nFor example, 5229225 is a palindromic number and it can be expressed in
9
+ exactly 4 different ways:\n\n2285<sup>2</sup> + 20<sup>3</sup> \n2223<sup>2</sup>
10
+ + 66<sup>3</sup> \n1810<sup>2</sup> + 125<sup>3</sup> \n1197<sup>2</sup> + 156<sup>3</sup>\n\nFind
11
+ the sum of the five smallest such palindromic numbers.\n\n"
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  :id: 349
3
3
  :name: Langton's ant
4
- :url: http://projecteuler.net/problem=349
4
+ :url: https://projecteuler.net/problem=349
5
5
  :content: "An ant moves on a regular grid of squares that are coloured either black
6
- or white. \n \rThe ant is always oriented in one of the cardinal directions (left,
6
+ or white. \n The ant is always oriented in one of the cardinal directions (left,
7
7
  right, up or down) and moves from square to adjacent square according to the following
8
- rules: \n\r- if it is on a black square, it flips the color of the square to white,
9
- rotates 90 degrees counterclockwise and moves forward one square. \n\r- if it is
8
+ rules: \n- if it is on a black square, it flips the color of the square to white,
9
+ rotates 90 degrees counterclockwise and moves forward one square. \n- if it is
10
10
  on a white square, it flips the color of the square to black, rotates 90 degrees
11
11
  clockwise and moves forward one square.\n\nStarting with a grid that is entirely
12
12
  white, how many squares are black after 10<sup>18</sup> moves of the ant?\n\n"
data/data/problems/35.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 35
3
3
  :name: Circular primes
4
- :url: http://projecteuler.net/problem=35
4
+ :url: https://projecteuler.net/problem=35
5
5
  :content: |+
6
6
  The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 350
3
3
  :name: Constraining the least greatest and the greatest least
4
- :url: http://projecteuler.net/problem=350
4
+ :url: https://projecteuler.net/problem=350
5
5
  :content: "A _list of size n_ is a sequence of <var>n</var> natural numbers. \n Examples
6
6
  are (2,4,6), (2,6,4), (10,6,15,6), and (11).\n\nThe **greatest common divisor**
7
7
  , or gcd, of a list is the largest natural number that divides all entries of the
@@ -9,8 +9,7 @@
9
9
  **least common multiple** , or lcm, of a list is the smallest natural number divisible
10
10
  by each entry of the list. \nExamples: lcm(2,6,4) = 12, lcm(10,6,15,6) = 30 and
11
11
  lcm(11) = 11.\n\nLet f(<var>G</var>, <var>L</var>, <var>N</var>) be the number of
12
- lists of size <var>N</var> with gcd ![]({{ images_dir }}/symbol_ge.gif) <var>G</var>
13
- and lcm ![≤]({{ images_dir }}/symbol_le.gif) <var>L</var>. For example:\n\nf(10,
14
- 100, 1) = 91. \n\rf(10, 100, 2) = 327. \n\rf(10, 100, 3) = 1135. \n\rf(10, 100,
15
- 1000) mod 101<sup>4</sup> = 3286053.\n\nFind f(10<sup>6</sup>, 10<sup>12</sup>,
16
- 10<sup>18</sup>) mod 101<sup>4</sup>.\n\n"
12
+ lists of size <var>N</var> with gcd ≥ <var>G</var> and lcm ≤ <var>L</var>. For example:\n\nf(10,
13
+ 100, 1) = 91. \nf(10, 100, 2) = 327. \nf(10, 100, 3) = 1135. \nf(10, 100, 1000)
14
+ mod 101<sup>4</sup> = 3286053.\n\nFind f(10<sup>6</sup>, 10<sup>12</sup>, 10<sup>18</sup>)
15
+ mod 101<sup>4</sup>.\n\n"
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  :id: 351
3
3
  :name: Hexagonal orchards
4
- :url: http://projecteuler.net/problem=351
4
+ :url: https://projecteuler.net/problem=351
5
5
  :content: "A _hexagonal orchard_ of order <var>n</var> is a triangular lattice made
6
6
  up of points within a regular hexagon with side <var>n</var>. The following is an
7
- example of a hexagonal orchard of order 5:\n\n ![]({{ images_dir }}/p_351_hexorchard.png)
8
- \ \n\nHighlighted in green are the points which are hidden from the center by a
9
- point closer to it. It can be seen that for a hexagonal orchard of order 5, 30 points
10
- are hidden from the center.\n\nLet H(<var>n</var>) be the number of points hidden
11
- from the center in a hexagonal orchard of order <var>n</var>.\n\nH(5) = 30. H(10)
12
- = 138. H(1 000) = 1177848.\n\nFind H(100 000 000).\n\n"
7
+ example of a hexagonal orchard of order 5:\n\n ![p351_hexorchard.png]({{ images_dir
8
+ }}/p351_hexorchard.png) \n\nHighlighted in green are the points which are hidden
9
+ from the center by a point closer to it. It can be seen that for a hexagonal orchard
10
+ of order 5, 30 points are hidden from the center.\n\nLet H(<var>n</var>) be the
11
+ number of points hidden from the center in a hexagonal orchard of order <var>n</var>.\n\nH(5)
12
+ = 30. H(10) = 138. H(1 000) = 1177848.\n\nFind H(100 000 000).\n\n"
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  :id: 352
3
3
  :name: Blood tests
4
- :url: http://projecteuler.net/problem=352
4
+ :url: https://projecteuler.net/problem=352
5
5
  :content: "Each one of the 25 sheep in a flock must be tested for a rare virus, known
6
- to affect 2% of the sheep population.\rAn accurate and extremely sensitive PCR test
6
+ to affect 2% of the sheep population. An accurate and extremely sensitive PCR test
7
7
  exists for blood samples, producing a clear positive / negative result, but it is
8
8
  very time-consuming and expensive.\n\nBecause of the high cost, the vet-in-charge
9
9
  suggests that instead of performing 25 separate tests, the following procedure can
10
- be used instead: \n \n \n\rThe sheep are split into 5 groups of 5 sheep in each
11
- group. \rFor each group, the 5 samples are mixed together and a single test is performed.
10
+ be used instead: \n \nThe sheep are split into 5 groups of 5 sheep in each group.
11
+ For each group, the 5 samples are mixed together and a single test is performed.
12
12
  Then,\n\n- If the result is negative, all the sheep in that group are deemed to
13
13
  be virus-free.\n- If the result is positive, 5 additional tests will be performed
14
14
  (a separate test for each animal) to determine the affected individual(s).\n\nSince
@@ -16,11 +16,10 @@
16
16
  (on the pooled samples) for each group will be:\n\n- Negative (and no more tests
17
17
  needed) with probability 0.98<sup>5</sup> = 0.9039207968.\n- Positive (5 additional
18
18
  tests needed) with probability 1 - 0.9039207968 = 0.0960792032.\n\nThus, the expected
19
- number of tests for each group is 1 + 0.0960792032 ![×]({{ images_dir }}/symbol_times.gif)
20
- 5 = 1.480396016. \n\rConsequently, all 5 groups can be screened using an average
21
- of only 1.480396016 ![×]({{ images_dir }}/symbol_times.gif) 5 = **7.40198008** tests,
22
- which represents a huge saving of more than 70% !\n\nAlthough the scheme we have
23
- just described seems to be very efficient, it can still be improved considerably
19
+ number of tests for each group is 1 + 0.0960792032 × 5 = 1.480396016. \nConsequently,
20
+ all 5 groups can be screened using an average of only 1.480396016 × 5 = **7.40198008**
21
+ tests, which represents a huge saving of more than 70% !\n\nAlthough the scheme
22
+ we have just described seems to be very efficient, it can still be improved considerably
24
23
  (always assuming that the test is sufficiently sensitive and that there are no adverse
25
24
  effects caused by mixing different samples). E.g.:\n\n- We may start by running
26
25
  a test on a mixture of all the 25 samples. It can be verified that in about 60.35%
@@ -34,11 +33,11 @@
34
33
  of possibilities, there is one restriction we place when devising the most cost-efficient
35
34
  testing scheme: whenever we start with a mixed sample, all the sheep contributing
36
35
  to that sample must be fully screened (i.e. a verdict of infected / virus-free must
37
- be reached for all of them) before we start examining any other animals.\n\n\rFor
36
+ be reached for all of them) before we start examining any other animals.\n\nFor
38
37
  the current example, it turns out that the most cost-efficient testing scheme (we'll
39
- call it the _optimal strategy_) requires an average of just **4.155452** tests!\r\r\r\n\nUsing
38
+ call it the _optimal strategy_) requires an average of just **4.155452** tests!\n\nUsing
40
39
  the optimal strategy, let T(<var>s</var>,<var>p</var>) represent the average number
41
40
  of tests needed to screen a flock of <var>s</var> sheep for a virus having probability
42
- <var>p</var> to be present in any individual. \n\rThus, rounded to six decimal
43
- places, T(25, 0.02) = 4.155452 and T(25, 0.10) = 12.702124.\n\nFind ΣT(10000, p)
44
- for p=0.01, 0.02, 0.03, ... 0.50. \n\rGive your answer rounded to six decimal places.\n\n"
41
+ <var>p</var> to be present in any individual. \nThus, rounded to six decimal places,
42
+ T(25, 0.02) = 4.155452 and T(25, 0.10) = 12.702124.\n\nFind ΣT(10000, p) for p=0.01,
43
+ 0.02, 0.03, ... 0.50. \nGive your answer rounded to six decimal places.\n\n"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 353
3
3
  :name: Risky moon
4
- :url: http://projecteuler.net/problem=353
4
+ :url: https://projecteuler.net/problem=353
5
5
  :content: |+
6
6
  A moon could be described by the sphere C(<var>r</var>) with centre (0,0,0) and radius <var>r</var>.
7
7
 
@@ -15,7 +15,7 @@
15
15
 
16
16
  You are given that M(7)=0.1784943998 rounded to 10 digits behind the decimal point.
17
17
 
18
- Find ![]({{ images_dir }}/symbol_sum.gif)M(2<sup>n</sup>-1) for 1 ![]({{ images_dir }}/symbol_le.gif)n ![]({{ images_dir }}/symbol_le.gif)15.
18
+ Find ∑M(2<sup>n</sup>-1) for 1≤n≤15.
19
19
 
20
20
  Give your answer rounded to 10 digits behind the decimal point in the form a.bcdefghijk.
21
21
 
@@ -1,14 +1,12 @@
1
1
  ---
2
2
  :id: 354
3
3
  :name: Distances in a bee's honeycomb
4
- :url: http://projecteuler.net/problem=354
4
+ :url: https://projecteuler.net/problem=354
5
5
  :content: "Consider a honey bee's honeycomb where each cell is a perfect regular hexagon
6
- with side length 1.\n\n ![]({{ images_dir }}/p_354_bee_honeycomb.png)\n\nOne particular
7
- cell is occupied by the queen bee. \n\rFor a positive real number <var>L</var>,
6
+ with side length 1.\n\n ![p354_bee_honeycomb.png]({{ images_dir }}/p354_bee_honeycomb.png)\n\nOne
7
+ particular cell is occupied by the queen bee. \nFor a positive real number <var>L</var>,
8
8
  let B(<var>L</var>) count the cells with distance <var>L</var> from the queen bee
9
9
  cell (all distances are measured from centre to centre); you may assume that the
10
- honeycomb is large enough to accommodate for any distance we wish to consider. \n\rFor
11
- example, B( ![]({{ images_dir }}/symbol_radic.gif)3) = 6, B( ![√]({{ images_dir
12
- }}/symbol_radic.gif)21) = 12 and B(111 111 111) = 54.\n\nFind the number of <var>L</var>
13
- ![≤]({{ images_dir }}/symbol_le.gif) 5·10<sup>11</sup> such that B(<var>L</var>)
14
- = 450.\n\n"
10
+ honeycomb is large enough to accommodate for any distance we wish to consider. \nFor
11
+ example, B(√3) = 6, B(√21) = 12 and B(111 111 111) = 54.\n\nFind the number of <var>L</var>
12
+ 5·10<sup>11</sup> such that B(<var>L</var>) = 450.\n\n"
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  :id: 355
3
3
  :name: Maximal coprime subset
4
- :url: http://projecteuler.net/problem=355
4
+ :url: https://projecteuler.net/problem=355
5
5
  :content: "Define Co(<var>n</var>) to be the maximal possible sum of a set of mutually
6
- co-prime elements from {12, ..., <var>n</var>}. \n For example Co(10) is 30 and
7
- hits that maximum on the subset {15789}.\n\nYou are given that Co(30) =
8
- 193 and Co(100) = 1356.\n\nFind Co(200000).\n\n"
6
+ co-prime elements from {1,&nbsp;2,&nbsp;...,&nbsp;<var>n</var>}. \n For example
7
+ Co(10) is 30 and hits that maximum on the subset {1,&nbsp;5,&nbsp;7,&nbsp;8,&nbsp;9}.\n\nYou
8
+ are given that Co(30) = 193 and Co(100) = 1356.\n\nFind Co(200000).\n\n"
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  :id: 356
3
3
  :name: Largest roots of cubic polynomials
4
- :url: http://projecteuler.net/problem=356
4
+ :url: https://projecteuler.net/problem=356
5
5
  :content: "Let <var>a</var><sub><var>n</var></sub> be the largest real root of a polynomial
6
6
  <var>g</var>(x) = x<sup>3</sup> - 2<sup><var>n</var></sup>·x<sup>2</sup> + <var>n</var>.
7
- \ \n\rFor example, <var>a</var><sub>2</sub> = 3.86619826...\n\nFind the last eight
8
- digits of ![]({{ images_dir }}/p_356_cubicpoly1.gif).\n\n<u><i>Note</i></u>: ![]({{
9
- images_dir }}/p_356_cubicpoly2.gif) represents the floor function.\n\n"
7
+ \ \nFor example, <var>a</var><sub>2</sub> = 3.86619826...\n\nFind the last eight
8
+ digits of ![p356_cubicpoly1.gif]({{ images_dir }}/p356_cubicpoly1.gif).\n\n<u><i>Note</i></u>:
9
+ ![p356_cubicpoly2.gif]({{ images_dir }}/p356_cubicpoly2.gif) represents the floor
10
+ function.\n\n"
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  :id: 357
3
3
  :name: Prime generating integers
4
- :url: http://projecteuler.net/problem=357
5
- :content: "Consider the divisors of 30: 1,2,3,5,6,10,15,30. \n\rIt can be seen that
4
+ :url: https://projecteuler.net/problem=357
5
+ :content: "Consider the divisors of 30: 1,2,3,5,6,10,15,30. \nIt can be seen that
6
6
  for every divisor <var>d</var> of 30, <var>d</var>+30/<var>d</var> is prime.\n\nFind
7
7
  the sum of all positive integers <var>n</var> not exceeding 100 000 000 \nsuch
8
- that\rfor every divisor <var>d</var> of <var>n</var>, <var>d</var>+<var>n</var>/<var>d</var>
8
+ that for every divisor <var>d</var> of <var>n</var>, <var>d</var>+<var>n</var>/<var>d</var>
9
9
  is prime.\n\n"
@@ -1,21 +1,16 @@
1
1
  ---
2
2
  :id: 358
3
3
  :name: Cyclic numbers
4
- :url: http://projecteuler.net/problem=358
4
+ :url: https://projecteuler.net/problem=358
5
5
  :content: "A **cyclic number** with <var>n</var> digits has a very interesting property:
6
- \ \n\rWhen it is multiplied by 1, 2, 3, 4, ... <var>n</var>, all the products have
6
+ \ \nWhen it is multiplied by 1, 2, 3, 4, ... <var>n</var>, all the products have
7
7
  exactly the same digits, in the same order, but rotated in a circular fashion!\n\nThe
8
- smallest cyclic number is the 6-digit number 142857 : \n\r142857 ![×]({{ images_dir
9
- }}/symbol_times.gif) 1 = 142857 \n\r142857 ![×]({{ images_dir }}/symbol_times.gif)
10
- 2 = 285714 \n\r142857 ![×]({{ images_dir }}/symbol_times.gif) 3 = 428571 \n\r142857
11
- ![×]({{ images_dir }}/symbol_times.gif) 4 = 571428 \n\r142857 ![×]({{ images_dir
12
- }}/symbol_times.gif) 5 = 714285 \n\r142857 ![×]({{ images_dir }}/symbol_times.gif)
13
- 6 = 857142\n\nThe next cyclic number is 0588235294117647 with 16 digits : \n\r0588235294117647
14
- ![×]({{ images_dir }}/symbol_times.gif) 1 = 0588235294117647 \n\r0588235294117647
15
- ![×]({{ images_dir }}/symbol_times.gif) 2 = 1176470588235294 \n\r0588235294117647
16
- ![×]({{ images_dir }}/symbol_times.gif) 3 = 1764705882352941 \n\r... \n\r0588235294117647
17
- ![×]({{ images_dir }}/symbol_times.gif) 16 = 9411764705882352\n\nNote that for cyclic
18
- numbers, leading zeros are important.\n\nThere is only one cyclic number for which,
19
- the eleven leftmost digits are 00000000137 and the five rightmost digits are 56789
20
- (i.e., it has the form 00000000137...56789 with an unknown number of digits in the
21
- middle). Find the sum of all its digits.\n\n"
8
+ smallest cyclic number is the 6-digit number 142857 : \n142857 × 1 = 142857 \n142857
9
+ × 2 = 285714 \n142857 × 3 = 428571 \n142857 × 4 = 571428 \n142857 × 5 = 714285
10
+ \ \n142857 × 6 = 857142\n\nThe next cyclic number is 0588235294117647 with 16 digits
11
+ : \n0588235294117647 × 1 = 0588235294117647 \n0588235294117647 × 2 = 1176470588235294
12
+ \ \n0588235294117647 × 3 = 1764705882352941 \n... \n0588235294117647 × 16 = 9411764705882352\n\nNote
13
+ that for cyclic numbers, leading zeros are important.\n\nThere is only one cyclic
14
+ number for which, the eleven leftmost digits are 00000000137 and the five rightmost
15
+ digits are 56789 (i.e., it has the form 00000000137...56789 with an unknown number
16
+ of digits in the middle). Find the sum of all its digits.\n\n"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 359
3
3
  :name: Hilbert's New Hotel
4
- :url: http://projecteuler.net/problem=359
4
+ :url: https://projecteuler.net/problem=359
5
5
  :content: "An infinite number of people (numbered 1, 2, 3, etc.) are lined up to get
6
6
  a room at Hilbert's newest infinite hotel. The hotel contains an infinite number
7
7
  of floors (numbered 1, 2, 3, etc.), and each floor contains an infinite number of
@@ -10,14 +10,14 @@
10
10
  gets the first vacant room in the lowest numbered floor satisfying either of the
11
11
  following:\n\n- the floor is empty\n- the floor is not empty, and if the latest
12
12
  person taking a room in that floor is person <var>m</var>, then <var>m</var> + <var>n</var>
13
- is a perfect square\n\nPerson 1 gets room 1 in floor 1 since floor 1 is empty.\r
14
- \ \nPerson 2 does not get room 2 in floor 1 since 1 + 2 = 3 is not a perfect square.\r
15
- \ \nPerson 2 instead gets room 1 in floor 2 since floor 2 is empty.\r \nPerson
16
- 3 gets room 2 in floor 1 since 1 + 3 = 4 is a perfect square.\n\nEventually, every
17
- person in the line gets a room in the hotel.\n\nDefine P(<var>f</var>, <var>r</var>)
18
- to be <var>n</var> if person <var>n</var> occupies room <var>r</var> in floor <var>f</var>,
19
- and 0 if no person occupies the room. Here are a few examples:\r \nP(1, 1) = 1\r
20
- \ \nP(1, 2) = 3\r \nP(2, 1) = 2\r \nP(10, 20) = 440\r \nP(25, 75) = 4863\r \nP(99,
21
- 100) = 19454\n\nFind the sum of all P(<var>f</var>, <var>r</var>) for all positive
22
- <var>f</var> and <var>r</var> such that <var>f</var> ![×]({{ images_dir }}/symbol_times.gif)
23
- <var>r</var> = 71328803586048 and give the last 8 digits as your answer.\n\n"
13
+ is a perfect square\n\nPerson 1 gets room 1 in floor 1 since floor 1 is empty. \nPerson
14
+ 2 does not get room 2 in floor 1 since 1 + 2 = 3 is not a perfect square. \nPerson
15
+ 2 instead gets room 1 in floor 2 since floor 2 is empty. \nPerson 3 gets room 2
16
+ in floor 1 since 1 + 3 = 4 is a perfect square.\n\nEventually, every person in the
17
+ line gets a room in the hotel.\n\nDefine P(<var>f</var>, <var>r</var>) to be <var>n</var>
18
+ if person <var>n</var> occupies room <var>r</var> in floor <var>f</var>, and 0 if
19
+ no person occupies the room. Here are a few examples: \nP(1, 1) = 1 \nP(1, 2)
20
+ = 3 \nP(2, 1) = 2 \nP(10, 20) = 440 \nP(25, 75) = 4863 \nP(99, 100) = 19454\n\nFind
21
+ the sum of all P(<var>f</var>, <var>r</var>) for all positive <var>f</var> and <var>r</var>
22
+ such that <var>f</var> × <var>r</var> = 71328803586048 and give the last 8 digits
23
+ as your answer.\n\n"
data/data/problems/36.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 36
3
3
  :name: Double-base palindromes
4
- :url: http://projecteuler.net/problem=36
4
+ :url: https://projecteuler.net/problem=36
5
5
  :content: |+
6
6
  The decimal number, 585 = 1001001001<sub>2</sub> (binary), is palindromic in both bases.
7
7
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  :id: 360
3
3
  :name: Scary Sphere
4
- :url: http://projecteuler.net/problem=360
4
+ :url: https://projecteuler.net/problem=360
5
5
  :content: "Given two points (x<sub>1</sub>,y<sub>1</sub>,z<sub>1</sub>) and (x<sub>2</sub>,y<sub>2</sub>,z<sub>2</sub>)
6
6
  in three dimensional space, the **Manhattan distance** between those points is defined
7
7
  as \n |x<sub>1</sub>-x<sub>2</sub>|+|y<sub>1</sub>-y<sub>2</sub>|+|z<sub>1</sub>-z<sub>2</sub>|.\n\nLet
8
8
  C(<var>r</var>) be a sphere with radius <var>r</var> and center in the origin O(0,0,0).
9
- \ \n\rLet I(<var>r</var>) be the set of all points with integer coordinates on the
10
- surface of C(<var>r</var>). \n\rLet S(<var>r</var>) be the sum of the Manhattan
11
- distances of all elements of I(<var>r</var>) to the origin O.\n\nE.g. S(45)=34518.\n\nFind
9
+ \ \nLet I(<var>r</var>) be the set of all points with integer coordinates on the
10
+ surface of C(<var>r</var>). \nLet S(<var>r</var>) be the sum of the Manhattan distances
11
+ of all elements of I(<var>r</var>) to the origin O.\n\nE.g. S(45)=34518.\n\nFind
12
12
  S(10<sup>10</sup>).\n\n"
@@ -1,20 +1,20 @@
1
1
  ---
2
2
  :id: 361
3
3
  :name: Subsequence of Thue-Morse sequence
4
- :url: http://projecteuler.net/problem=361
4
+ :url: https://projecteuler.net/problem=361
5
5
  :content: "The **Thue-Morse sequence** {T<sub><var>n</var></sub>} is a binary sequence
6
6
  satisfying:\n\n- T<sub>0</sub> = 0\n- T<sub>2<var>n</var></sub> = T<sub><var>n</var></sub>\n-
7
7
  T<sub>2<var>n</var>+1</sub> = 1 - T<sub><var>n</var></sub>\n\nThe first several
8
- terms of {T<sub><var>n</var></sub>} are given as follows: \n\r01101001100101101001011001101001....\n\nWe
8
+ terms of {T<sub><var>n</var></sub>} are given as follows: \n01101001100101101001011001101001....\n\nWe
9
9
  define {A<sub><var>n</var></sub>} as the sorted sequence of integers such that the
10
10
  binary expression of each element appears as a subsequence in {T<sub><var>n</var></sub>}.
11
- \ \n\rFor example, the decimal number 18 is expressed as 10010 in binary. 10010
12
- appears in {T<sub><var>n</var></sub>} (T<sub>8</sub> to T<sub>12</sub>), so 18 is
13
- an element of {A<sub><var>n</var></sub>}. \n\rThe decimal number 14 is expressed
14
- as 1110 in binary. 1110 never appears in {T<sub><var>n</var></sub>}, so 14 is not
15
- an element of {A<sub><var>n</var></sub>}.\n\nThe first several terms of A<sub><var>n</var></sub>
11
+ \ \nFor example, the decimal number 18 is expressed as 10010 in binary. 10010 appears
12
+ in {T<sub><var>n</var></sub>} (T<sub>8</sub> to T<sub>12</sub>), so 18 is an element
13
+ of {A<sub><var>n</var></sub>}. \nThe decimal number 14 is expressed as 1110 in
14
+ binary. 1110 never appears in {T<sub><var>n</var></sub>}, so 14 is not an element
15
+ of {A<sub><var>n</var></sub>}.\n\nThe first several terms of A<sub><var>n</var></sub>
16
16
  are given as follows:\n\n| <var>n</var> | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
17
17
  | 10 | 11 | 12 | … |\n| A<sub><var>n</var></sub> | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 9
18
18
  | 10 | 11 | 12 | 13 | 18 | … |\n\nWe can also verify that A<sub>100</sub> = 3251
19
- and A<sub>1000</sub> = 80852364498.\n\nFind the last 9 digits of ![]({{ images_dir
20
- }}/p_361_Thue-Morse1.gif).\n\n"
19
+ and A<sub>1000</sub> = 80852364498.\n\nFind the last 9 digits of ![p361_Thue-Morse1.gif]({{
20
+ images_dir }}/p361_Thue-Morse1.gif).\n\n"
@@ -1,18 +1,11 @@
1
1
  ---
2
2
  :id: 362
3
3
  :name: Squarefree factors
4
- :url: http://projecteuler.net/problem=362
5
- :content: "Consider the number 54. \n\r54 can be factored in 7 distinct ways into
6
- one or more factors larger than 1: \n\r54, 2 ![×]({{ images_dir }}/symbol_times.gif)27,
7
- 3 ![×]({{ images_dir }}/symbol_times.gif)18, 6 ![×]({{ images_dir }}/symbol_times.gif)9,
8
- 3 ![×]({{ images_dir }}/symbol_times.gif)3 ![×]({{ images_dir }}/symbol_times.gif)6,
9
- 2 ![×]({{ images_dir }}/symbol_times.gif)3 ![×]({{ images_dir }}/symbol_times.gif)9
10
- and 2 ![×]({{ images_dir }}/symbol_times.gif)3 ![×]({{ images_dir }}/symbol_times.gif)3
11
- ![×]({{ images_dir }}/symbol_times.gif)3. \n\rIf we require that the factors are
12
- all squarefree only two ways remain: 3 ![×]({{ images_dir }}/symbol_times.gif)3
13
- ![×]({{ images_dir }}/symbol_times.gif)6 and 2 ![×]({{ images_dir }}/symbol_times.gif)3
14
- ![×]({{ images_dir }}/symbol_times.gif)3 ![×]({{ images_dir }}/symbol_times.gif)3.\n\nLet's
15
- call Fsf(<var>n</var>) the number of ways <var>n</var> can be factored into one
16
- or more squarefree factors larger than 1, so\rFsf(54)=2.\n\nLet S(<var>n</var>)
17
- be ![∑]({{ images_dir }}/symbol_sum.gif)Fsf(<var>k</var>) for <var>k</var>=2 to
18
- <var>n</var>.\n\nS(100)=193.\n\nFind S(10 000 000 000).\n\n"
4
+ :url: https://projecteuler.net/problem=362
5
+ :content: "Consider the number 54. \n54 can be factored in 7 distinct ways into one
6
+ or more factors larger than 1: \n54, 2×27, 3×18, 6×9, 3×3×6, 2×3×9 and 2×3×3×3.
7
+ \ \nIf we require that the factors are all squarefree only two ways remain: 3×3×6
8
+ and 2×3×3×3.\n\nLet's call Fsf(<var>n</var>) the number of ways <var>n</var> can
9
+ be factored into one or more squarefree factors larger than 1, so Fsf(54)=2.\n\nLet
10
+ S(<var>n</var>) be ∑Fsf(<var>k</var>) for <var>k</var>=2 to <var>n</var>.\n\nS(100)=193.\n\nFind
11
+ S(10 000 000 000).\n\n"