euler-manager 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (645) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -1
  3. data/Rakefile +3 -0
  4. data/bin/euler +28 -9
  5. data/config/config.rb +1 -0
  6. data/data/answers.yml +430 -456
  7. data/data/images/blackdot.gif +0 -0
  8. data/data/images/bracket_left.gif +0 -0
  9. data/data/images/bracket_right.gif +0 -0
  10. data/data/images/p295_lenticular.gif +0 -0
  11. data/data/images/p296_bisector.gif +0 -0
  12. data/data/images/p303_formula100.gif +0 -0
  13. data/data/images/p303_formula10000.gif +0 -0
  14. data/data/images/p392_gridlines.png +0 -0
  15. data/data/images/p400_winning.png +0 -0
  16. data/data/images/p411_longpath.png +0 -0
  17. data/data/images/p412_table53.png +0 -0
  18. data/data/images/p412_tablenums.png +0 -0
  19. data/data/images/p422_hyperbola.gif +0 -0
  20. data/data/images/p428_necklace.png +0 -0
  21. data/data/images/p_015.gif +0 -0
  22. data/data/images/p_068_1.gif +0 -0
  23. data/data/images/p_068_2.gif +0 -0
  24. data/data/images/p_085.gif +0 -0
  25. data/data/images/p_086.gif +0 -0
  26. data/data/images/p_090.gif +0 -0
  27. data/data/images/p_091_1.gif +0 -0
  28. data/data/images/p_091_2.gif +0 -0
  29. data/data/images/p_107_1.gif +0 -0
  30. data/data/images/p_107_2.gif +0 -0
  31. data/data/images/p_109.gif +0 -0
  32. data/data/images/p_126.gif +0 -0
  33. data/data/images/p_128.gif +0 -0
  34. data/data/images/p_138.gif +0 -0
  35. data/data/images/p_139.gif +0 -0
  36. data/data/images/p_143_torricelli.gif +0 -0
  37. data/data/images/p_144_1.gif +0 -0
  38. data/data/images/p_144_2.gif +0 -0
  39. data/data/images/p_147.gif +0 -0
  40. data/data/images/p_150.gif +0 -0
  41. data/data/images/p_151.gif +0 -0
  42. data/data/images/p_152_sum.gif +0 -0
  43. data/data/images/p_153_formule1.gif +0 -0
  44. data/data/images/p_153_formule2.gif +0 -0
  45. data/data/images/p_153_formule5.gif +0 -0
  46. data/data/images/p_153_formule6.gif +0 -0
  47. data/data/images/p_154_pyramid.gif +0 -0
  48. data/data/images/p_155_capacitors1.gif +0 -0
  49. data/data/images/p_155_capsform.gif +0 -0
  50. data/data/images/p_155_capsmu.gif +0 -0
  51. data/data/images/p_161_k9.gif +0 -0
  52. data/data/images/p_161_trio1.gif +0 -0
  53. data/data/images/p_161_trio3.gif +0 -0
  54. data/data/images/p_163.gif +0 -0
  55. data/data/images/p_173_square_laminas.gif +0 -0
  56. data/data/images/p_177_quad.gif +0 -0
  57. data/data/images/p_184.gif +0 -0
  58. data/data/images/p_189_colours.gif +0 -0
  59. data/data/images/p_189_grid.gif +0 -0
  60. data/data/images/p_194_Fig.png +0 -0
  61. data/data/images/p_194_GraphA.png +0 -0
  62. data/data/images/p_194_GraphB.png +0 -0
  63. data/data/images/p_199_circles_in_circles.gif +0 -0
  64. data/data/images/p_201_laserbeam.gif +0 -0
  65. data/data/images/p_208_robotwalk.gif +0 -0
  66. data/data/images/p_215_crackfree.gif +0 -0
  67. data/data/images/p_220.gif +0 -0
  68. data/data/images/p_226_formula.gif +0 -0
  69. data/data/images/p_226_scoop2.gif +0 -0
  70. data/data/images/p_228.png +0 -0
  71. data/data/images/p_237.gif +0 -0
  72. data/data/images/p_244_example.gif +0 -0
  73. data/data/images/p_244_start.gif +0 -0
  74. data/data/images/p_244_target.gif +0 -0
  75. data/data/images/p_246_anim.gif +0 -0
  76. data/data/images/p_246_ellipse.gif +0 -0
  77. data/data/images/p_247_hypersquares.gif +0 -0
  78. data/data/images/p_251_cardano.gif +0 -0
  79. data/data/images/p_252_convexhole.gif +0 -0
  80. data/data/images/p_255_Example.gif +0 -0
  81. data/data/images/p_255_Heron.gif +0 -0
  82. data/data/images/p_256_tatami3.gif +0 -0
  83. data/data/images/p_257_bisector.gif +0 -0
  84. data/data/images/p_262_formula1.gif +0 -0
  85. data/data/images/p_264_TriangleCentres.gif +0 -0
  86. data/data/images/p_265_BinaryCircles.gif +0 -0
  87. data/data/images/p_270_CutSquare.gif +0 -0
  88. data/data/images/p_275_sculptures2.gif +0 -0
  89. data/data/images/p_281_pizza.gif +0 -0
  90. data/data/images/p_282_formula.gif +0 -0
  91. data/data/images/p_282formula3.gif +0 -0
  92. data/data/images/p_287_quadtree.gif +0 -0
  93. data/data/images/p_289_euler.gif +0 -0
  94. data/data/images/p_291_formula.gif +0 -0
  95. data/data/images/p_299_ThreeSimTri.gif +0 -0
  96. data/data/images/p_300_protein.gif +0 -0
  97. data/data/images/p_306_pstrip.gif +0 -0
  98. data/data/images/p_309_ladders.gif +0 -0
  99. data/data/images/p_311_biclinic.gif +0 -0
  100. data/data/images/p_312_sierpinsky8t.gif +0 -0
  101. data/data/images/p_312_sierpinskyAt.gif +0 -0
  102. data/data/images/p_313_sliding_game_1.gif +0 -0
  103. data/data/images/p_313_sliding_game_2.gif +0 -0
  104. data/data/images/p_314_landgrab.gif +0 -0
  105. data/data/images/p_315_clocks.gif +0 -0
  106. data/data/images/p_316_decexp1.gif +0 -0
  107. data/data/images/p_316_decexp2.gif +0 -0
  108. data/data/images/p_316_decexp3.gif +0 -0
  109. data/data/images/p_321_swapping_counters_1.gif +0 -0
  110. data/data/images/p_321_swapping_counters_2.gif +0 -0
  111. data/data/images/p_326_formula1.gif +0 -0
  112. data/data/images/p_326_formula2.gif +0 -0
  113. data/data/images/p_327_rooms_of_doom.gif +0 -0
  114. data/data/images/p_328_sum1.gif +0 -0
  115. data/data/images/p_328_sum2.gif +0 -0
  116. data/data/images/p_330_formula.gif +0 -0
  117. data/data/images/p_331_crossflips1.gif +0 -0
  118. data/data/images/p_331_crossflips2.gif +0 -0
  119. data/data/images/p_331_crossflips3.gif +0 -0
  120. data/data/images/p_332_spherical.jpg +0 -0
  121. data/data/images/p_332_sum.gif +0 -0
  122. data/data/images/p_334_beans.gif +0 -0
  123. data/data/images/p_334_cases.gif +0 -0
  124. data/data/images/p_334_lfloor.gif +0 -0
  125. data/data/images/p_334_oplus.gif +0 -0
  126. data/data/images/p_334_rfloor.gif +0 -0
  127. data/data/images/p_335_mancala.gif +0 -0
  128. data/data/images/p_335_sum.gif +0 -0
  129. data/data/images/p_336_maximix.gif +0 -0
  130. data/data/images/p_338_gridpaper.gif +0 -0
  131. data/data/images/p_340_formula.gif +0 -0
  132. data/data/images/p_344_silverdollar.gif +0 -0
  133. data/data/images/p_351_hexorchard.png +0 -0
  134. data/data/images/p_354_bee_honeycomb.png +0 -0
  135. data/data/images/p_356_cubicpoly1.gif +0 -0
  136. data/data/images/p_356_cubicpoly2.gif +0 -0
  137. data/data/images/p_361_Thue-Morse1.gif +0 -0
  138. data/data/images/p_364_comf_dist.gif +0 -0
  139. data/data/images/p_372_pencilray1.jpg +0 -0
  140. data/data/images/p_372_pencilray2.gif +0 -0
  141. data/data/images/p_380_mazes.gif +0 -0
  142. data/data/images/p_384_formula.gif +0 -0
  143. data/data/images/p_385_ellipsetriangle.png +0 -0
  144. data/data/images/p_394_eatpie.gif +0 -0
  145. data/data/images/p_395_pythagorean.gif +0 -0
  146. data/data/images/p_404_c_ellipse.gif +0 -0
  147. data/data/images/p_405_tile1.png +0 -0
  148. data/data/images/p_405_tile2.gif +0 -0
  149. data/data/images/p_420_matrix.gif +0 -0
  150. data/data/images/p_424_kakuro1.gif +0 -0
  151. data/data/images/p_426_baxball1.gif +0 -0
  152. data/data/images/p_426_baxball2.gif +0 -0
  153. data/data/images/p_430_flips.gif +0 -0
  154. data/data/images/sod_13.gif +115 -0
  155. data/data/images/spacer.gif +0 -0
  156. data/data/images/symbol_asymp.gif +0 -0
  157. data/data/images/symbol_cong.gif +0 -0
  158. data/data/images/symbol_ge.gif +0 -0
  159. data/data/images/symbol_gt.gif +0 -0
  160. data/data/images/symbol_implies.gif +0 -0
  161. data/data/images/symbol_lceil.gif +0 -0
  162. data/data/images/symbol_le.gif +0 -0
  163. data/data/images/symbol_lfloor.gif +0 -0
  164. data/data/images/symbol_lt.gif +0 -0
  165. data/data/images/symbol_maps.gif +0 -0
  166. data/data/images/symbol_minus.gif +0 -0
  167. data/data/images/symbol_ne.gif +0 -0
  168. data/data/images/symbol_plusmn.gif +0 -0
  169. data/data/images/symbol_radic.gif +0 -0
  170. data/data/images/symbol_rceil.gif +0 -0
  171. data/data/images/symbol_rfloor.gif +0 -0
  172. data/data/images/symbol_sum.gif +0 -0
  173. data/data/images/symbol_times.gif +0 -0
  174. data/data/problems/1.yml +5 -3
  175. data/data/problems/10.yml +3 -4
  176. data/data/problems/100.yml +7 -9
  177. data/data/problems/101.yml +32 -45
  178. data/data/problems/102.yml +11 -12
  179. data/data/problems/103.yml +18 -22
  180. data/data/problems/104.yml +9 -11
  181. data/data/problems/105.yml +12 -17
  182. data/data/problems/106.yml +14 -15
  183. data/data/problems/107.yml +16 -16
  184. data/data/problems/108.yml +17 -28
  185. data/data/problems/109.yml +27 -29
  186. data/data/problems/11.yml +24 -29
  187. data/data/problems/110.yml +11 -15
  188. data/data/problems/111.yml +27 -17
  189. data/data/problems/112.yml +13 -11
  190. data/data/problems/113.yml +11 -9
  191. data/data/problems/114.yml +46 -100
  192. data/data/problems/115.yml +15 -12
  193. data/data/problems/116.yml +33 -72
  194. data/data/problems/117.yml +36 -78
  195. data/data/problems/118.yml +5 -5
  196. data/data/problems/119.yml +9 -7
  197. data/data/problems/12.yml +8 -9
  198. data/data/problems/120.yml +7 -13
  199. data/data/problems/121.yml +9 -11
  200. data/data/problems/122.yml +21 -38
  201. data/data/problems/123.yml +9 -9
  202. data/data/problems/124.yml +24 -54
  203. data/data/problems/125.yml +7 -8
  204. data/data/problems/126.yml +12 -13
  205. data/data/problems/127.yml +21 -27
  206. data/data/problems/128.yml +19 -14
  207. data/data/problems/129.yml +9 -8
  208. data/data/problems/13.yml +52 -2
  209. data/data/problems/130.yml +12 -15
  210. data/data/problems/131.yml +9 -8
  211. data/data/problems/132.yml +7 -8
  212. data/data/problems/133.yml +9 -9
  213. data/data/problems/134.yml +7 -15
  214. data/data/problems/135.yml +9 -16
  215. data/data/problems/136.yml +9 -13
  216. data/data/problems/137.yml +22 -32
  217. data/data/problems/138.yml +11 -16
  218. data/data/problems/139.yml +11 -11
  219. data/data/problems/14.yml +14 -24
  220. data/data/problems/140.yml +18 -25
  221. data/data/problems/141.yml +10 -11
  222. data/data/problems/142.yml +3 -10
  223. data/data/problems/143.yml +13 -16
  224. data/data/problems/144.yml +23 -26
  225. data/data/problems/145.yml +7 -7
  226. data/data/problems/146.yml +6 -6
  227. data/data/problems/147.yml +7 -8
  228. data/data/problems/148.yml +15 -7
  229. data/data/problems/149.yml +26 -35
  230. data/data/problems/15.yml +7 -7
  231. data/data/problems/150.yml +18 -29
  232. data/data/problems/151.yml +17 -15
  233. data/data/problems/152.yml +11 -8
  234. data/data/problems/153.yml +38 -53
  235. data/data/problems/154.yml +10 -12
  236. data/data/problems/155.yml +12 -15
  237. data/data/problems/156.yml +20 -22
  238. data/data/problems/157.yml +26 -28
  239. data/data/problems/158.yml +13 -14
  240. data/data/problems/159.yml +15 -25
  241. data/data/problems/16.yml +5 -2
  242. data/data/problems/160.yml +3 -4
  243. data/data/problems/161.yml +6 -10
  244. data/data/problems/162.yml +10 -11
  245. data/data/problems/163.yml +13 -15
  246. data/data/problems/164.yml +3 -3
  247. data/data/problems/165.yml +25 -28
  248. data/data/problems/166.yml +7 -11
  249. data/data/problems/167.yml +10 -12
  250. data/data/problems/168.yml +7 -9
  251. data/data/problems/169.yml +4 -5
  252. data/data/problems/17.yml +7 -7
  253. data/data/problems/170.yml +7 -10
  254. data/data/problems/171.yml +7 -9
  255. data/data/problems/172.yml +3 -2
  256. data/data/problems/173.yml +9 -7
  257. data/data/problems/174.yml +13 -15
  258. data/data/problems/175.yml +13 -15
  259. data/data/problems/176.yml +5 -5
  260. data/data/problems/177.yml +13 -12
  261. data/data/problems/178.yml +5 -5
  262. data/data/problems/179.yml +3 -6
  263. data/data/problems/18.yml +13 -17
  264. data/data/problems/180.yml +20 -25
  265. data/data/problems/181.yml +7 -3
  266. data/data/problems/182.yml +22 -27
  267. data/data/problems/183.yml +17 -23
  268. data/data/problems/184.yml +11 -14
  269. data/data/problems/185.yml +17 -18
  270. data/data/problems/186.yml +16 -24
  271. data/data/problems/187.yml +9 -12
  272. data/data/problems/188.yml +5 -6
  273. data/data/problems/189.yml +5 -7
  274. data/data/problems/19.yml +7 -8
  275. data/data/problems/190.yml +7 -9
  276. data/data/problems/191.yml +9 -10
  277. data/data/problems/192.yml +14 -22
  278. data/data/problems/193.yml +5 -3
  279. data/data/problems/194.yml +11 -14
  280. data/data/problems/195.yml +7 -9
  281. data/data/problems/196.yml +13 -21
  282. data/data/problems/197.yml +7 -11
  283. data/data/problems/198.yml +13 -16
  284. data/data/problems/199.yml +10 -10
  285. data/data/problems/2.yml +6 -6
  286. data/data/problems/20.yml +10 -18
  287. data/data/problems/200.yml +8 -8
  288. data/data/problems/201.yml +14 -16
  289. data/data/problems/202.yml +11 -10
  290. data/data/problems/203.yml +11 -16
  291. data/data/problems/204.yml +7 -7
  292. data/data/problems/205.yml +6 -6
  293. data/data/problems/206.yml +2 -2
  294. data/data/problems/207.yml +13 -16
  295. data/data/problems/208.yml +8 -8
  296. data/data/problems/209.yml +11 -23
  297. data/data/problems/21.yml +8 -9
  298. data/data/problems/210.yml +6 -6
  299. data/data/problems/211.yml +7 -7
  300. data/data/problems/212.yml +26 -36
  301. data/data/problems/213.yml +6 -7
  302. data/data/problems/214.yml +10 -11
  303. data/data/problems/215.yml +11 -14
  304. data/data/problems/216.yml +7 -10
  305. data/data/problems/217.yml +14 -23
  306. data/data/problems/218.yml +9 -10
  307. data/data/problems/219.yml +10 -15
  308. data/data/problems/22.yml +7 -9
  309. data/data/problems/220.yml +15 -20
  310. data/data/problems/221.yml +10 -16
  311. data/data/problems/222.yml +5 -3
  312. data/data/problems/223.yml +6 -8
  313. data/data/problems/224.yml +6 -8
  314. data/data/problems/225.yml +6 -7
  315. data/data/problems/226.yml +9 -12
  316. data/data/problems/227.yml +9 -9
  317. data/data/problems/228.yml +14 -17
  318. data/data/problems/229.yml +17 -25
  319. data/data/problems/23.yml +11 -15
  320. data/data/problems/230.yml +15 -19
  321. data/data/problems/231.yml +8 -12
  322. data/data/problems/232.yml +9 -10
  323. data/data/problems/233.yml +7 -6
  324. data/data/problems/234.yml +14 -19
  325. data/data/problems/235.yml +4 -5
  326. data/data/problems/236.yml +20 -22
  327. data/data/problems/237.yml +14 -9
  328. data/data/problems/238.yml +21 -33
  329. data/data/problems/239.yml +5 -5
  330. data/data/problems/24.yml +7 -6
  331. data/data/problems/240.yml +7 -7
  332. data/data/problems/241.yml +9 -12
  333. data/data/problems/242.yml +7 -9
  334. data/data/problems/243.yml +14 -15
  335. data/data/problems/244.yml +19 -28
  336. data/data/problems/245.yml +22 -30
  337. data/data/problems/246.yml +10 -13
  338. data/data/problems/247.yml +14 -17
  339. data/data/problems/248.yml +5 -2
  340. data/data/problems/249.yml +3 -3
  341. data/data/problems/25.yml +12 -11
  342. data/data/problems/250.yml +3 -3
  343. data/data/problems/251.yml +11 -9
  344. data/data/problems/252.yml +24 -25
  345. data/data/problems/253.yml +19 -32
  346. data/data/problems/254.yml +13 -17
  347. data/data/problems/255.yml +40 -50
  348. data/data/problems/256.yml +31 -39
  349. data/data/problems/257.yml +10 -14
  350. data/data/problems/258.yml +7 -9
  351. data/data/problems/259.yml +14 -12
  352. data/data/problems/26.yml +17 -7
  353. data/data/problems/260.yml +21 -25
  354. data/data/problems/261.yml +13 -15
  355. data/data/problems/262.yml +15 -16
  356. data/data/problems/263.yml +13 -15
  357. data/data/problems/264.yml +15 -16
  358. data/data/problems/265.yml +10 -12
  359. data/data/problems/266.yml +6 -6
  360. data/data/problems/267.yml +13 -10
  361. data/data/problems/268.yml +5 -4
  362. data/data/problems/269.yml +10 -11
  363. data/data/problems/27.yml +15 -21
  364. data/data/problems/270.yml +13 -13
  365. data/data/problems/271.yml +7 -9
  366. data/data/problems/272.yml +8 -11
  367. data/data/problems/273.yml +13 -17
  368. data/data/problems/274.yml +16 -19
  369. data/data/problems/275.yml +13 -15
  370. data/data/problems/276.yml +5 -7
  371. data/data/problems/277.yml +17 -20
  372. data/data/problems/278.yml +20 -28
  373. data/data/problems/279.yml +4 -3
  374. data/data/problems/28.yml +6 -13
  375. data/data/problems/280.yml +9 -9
  376. data/data/problems/281.yml +10 -13
  377. data/data/problems/282.yml +9 -6
  378. data/data/problems/283.yml +8 -8
  379. data/data/problems/284.yml +15 -18
  380. data/data/problems/285.yml +11 -11
  381. data/data/problems/286.yml +7 -8
  382. data/data/problems/287.yml +22 -32
  383. data/data/problems/288.yml +10 -11
  384. data/data/problems/289.yml +14 -15
  385. data/data/problems/29.yml +13 -20
  386. data/data/problems/290.yml +3 -4
  387. data/data/problems/291.yml +3 -6
  388. data/data/problems/292.yml +8 -9
  389. data/data/problems/293.yml +9 -10
  390. data/data/problems/294.yml +6 -6
  391. data/data/problems/295.yml +16 -21
  392. data/data/problems/296.yml +9 -11
  393. data/data/problems/297.yml +12 -15
  394. data/data/problems/298.yml +29 -29
  395. data/data/problems/299.yml +15 -21
  396. data/data/problems/3.yml +3 -3
  397. data/data/problems/30.yml +7 -8
  398. data/data/problems/300.yml +15 -16
  399. data/data/problems/301.yml +15 -17
  400. data/data/problems/302.yml +13 -14
  401. data/data/problems/303.yml +9 -7
  402. data/data/problems/304.yml +10 -15
  403. data/data/problems/305.yml +6 -10
  404. data/data/problems/306.yml +20 -24
  405. data/data/problems/307.yml +7 -8
  406. data/data/problems/308.yml +19 -30
  407. data/data/problems/309.yml +11 -12
  408. data/data/problems/31.yml +11 -14
  409. data/data/problems/310.yml +10 -15
  410. data/data/problems/311.yml +11 -17
  411. data/data/problems/312.yml +10 -11
  412. data/data/problems/313.yml +13 -13
  413. data/data/problems/314.yml +23 -25
  414. data/data/problems/315.yml +39 -45
  415. data/data/problems/316.yml +13 -13
  416. data/data/problems/317.yml +6 -7
  417. data/data/problems/318.yml +35 -57
  418. data/data/problems/319.yml +15 -19
  419. data/data/problems/32.yml +9 -10
  420. data/data/problems/320.yml +9 -8
  421. data/data/problems/321.yml +8 -9
  422. data/data/problems/322.yml +6 -8
  423. data/data/problems/323.yml +12 -15
  424. data/data/problems/324.yml +10 -13
  425. data/data/problems/325.yml +15 -21
  426. data/data/problems/326.yml +15 -8
  427. data/data/problems/327.yml +19 -23
  428. data/data/problems/328.yml +28 -31
  429. data/data/problems/329.yml +12 -13
  430. data/data/problems/33.yml +9 -9
  431. data/data/problems/330.yml +17 -36
  432. data/data/problems/331.yml +16 -22
  433. data/data/problems/332.yml +9 -11
  434. data/data/problems/333.yml +17 -20
  435. data/data/problems/334.yml +22 -34
  436. data/data/problems/335.yml +11 -12
  437. data/data/problems/336.yml +18 -20
  438. data/data/problems/337.yml +9 -11
  439. data/data/problems/338.yml +27 -37
  440. data/data/problems/339.yml +9 -9
  441. data/data/problems/34.yml +7 -3
  442. data/data/problems/340.yml +8 -10
  443. data/data/problems/341.yml +12 -14
  444. data/data/problems/342.yml +9 -13
  445. data/data/problems/343.yml +18 -25
  446. data/data/problems/344.yml +16 -17
  447. data/data/problems/345.yml +17 -22
  448. data/data/problems/346.yml +7 -7
  449. data/data/problems/347.yml +9 -12
  450. data/data/problems/348.yml +7 -8
  451. data/data/problems/349.yml +8 -9
  452. data/data/problems/35.yml +7 -4
  453. data/data/problems/350.yml +12 -14
  454. data/data/problems/351.yml +8 -9
  455. data/data/problems/352.yml +38 -42
  456. data/data/problems/353.yml +17 -21
  457. data/data/problems/354.yml +11 -13
  458. data/data/problems/355.yml +4 -4
  459. data/data/problems/356.yml +6 -6
  460. data/data/problems/357.yml +5 -5
  461. data/data/problems/358.yml +16 -25
  462. data/data/problems/359.yml +19 -22
  463. data/data/problems/36.yml +7 -4
  464. data/data/problems/360.yml +8 -8
  465. data/data/problems/361.yml +14 -15
  466. data/data/problems/362.yml +16 -28
  467. data/data/problems/363.yml +22 -23
  468. data/data/problems/364.yml +9 -11
  469. data/data/problems/365.yml +7 -13
  470. data/data/problems/366.yml +19 -22
  471. data/data/problems/367.yml +14 -15
  472. data/data/problems/368.yml +18 -35
  473. data/data/problems/369.yml +7 -11
  474. data/data/problems/37.yml +7 -6
  475. data/data/problems/370.yml +10 -13
  476. data/data/problems/371.yml +8 -9
  477. data/data/problems/372.yml +9 -12
  478. data/data/problems/373.yml +5 -6
  479. data/data/problems/374.yml +17 -21
  480. data/data/problems/375.yml +13 -17
  481. data/data/problems/376.yml +19 -21
  482. data/data/problems/377.yml +6 -7
  483. data/data/problems/378.yml +8 -11
  484. data/data/problems/379.yml +9 -11
  485. data/data/problems/38.yml +9 -13
  486. data/data/problems/380.yml +14 -17
  487. data/data/problems/381.yml +12 -18
  488. data/data/problems/382.yml +16 -19
  489. data/data/problems/383.yml +7 -9
  490. data/data/problems/384.yml +20 -24
  491. data/data/problems/385.yml +12 -16
  492. data/data/problems/386.yml +9 -11
  493. data/data/problems/387.yml +14 -15
  494. data/data/problems/388.yml +6 -8
  495. data/data/problems/389.yml +8 -8
  496. data/data/problems/39.yml +7 -6
  497. data/data/problems/390.yml +9 -14
  498. data/data/problems/391.yml +21 -25
  499. data/data/problems/392.yml +16 -17
  500. data/data/problems/393.yml +5 -6
  501. data/data/problems/394.yml +15 -18
  502. data/data/problems/395.yml +12 -13
  503. data/data/problems/396.yml +17 -22
  504. data/data/problems/397.yml +13 -16
  505. data/data/problems/398.yml +8 -9
  506. data/data/problems/399.yml +18 -18
  507. data/data/problems/4.yml +5 -4
  508. data/data/problems/40.yml +11 -14
  509. data/data/problems/400.yml +10 -11
  510. data/data/problems/401.yml +6 -7
  511. data/data/problems/402.yml +16 -21
  512. data/data/problems/403.yml +12 -14
  513. data/data/problems/404.yml +14 -16
  514. data/data/problems/405.yml +10 -11
  515. data/data/problems/406.yml +35 -41
  516. data/data/problems/407.yml +9 -16
  517. data/data/problems/408.yml +9 -9
  518. data/data/problems/409.yml +5 -7
  519. data/data/problems/41.yml +5 -4
  520. data/data/problems/410.yml +10 -13
  521. data/data/problems/411.yml +15 -19
  522. data/data/problems/412.yml +11 -15
  523. data/data/problems/413.yml +8 -8
  524. data/data/problems/414.yml +29 -34
  525. data/data/problems/415.yml +12 -15
  526. data/data/problems/416.yml +7 -7
  527. data/data/problems/417.yml +16 -17
  528. data/data/problems/418.yml +9 -12
  529. data/data/problems/419.yml +13 -18
  530. data/data/problems/42.yml +9 -10
  531. data/data/problems/420.yml +5 -6
  532. data/data/problems/421.yml +14 -25
  533. data/data/problems/422.yml +16 -18
  534. data/data/problems/423.yml +16 -18
  535. data/data/problems/424.yml +18 -19
  536. data/data/problems/425.yml +11 -12
  537. data/data/problems/426.yml +20 -21
  538. data/data/problems/427.yml +11 -13
  539. data/data/problems/428.yml +21 -25
  540. data/data/problems/429.yml +6 -6
  541. data/data/problems/43.yml +15 -13
  542. data/data/problems/430.yml +14 -16
  543. data/data/problems/44.yml +9 -12
  544. data/data/problems/45.yml +11 -11
  545. data/data/problems/46.yml +9 -14
  546. data/data/problems/47.yml +11 -16
  547. data/data/problems/48.yml +5 -3
  548. data/data/problems/49.yml +7 -6
  549. data/data/problems/5.yml +5 -4
  550. data/data/problems/50.yml +11 -6
  551. data/data/problems/51.yml +9 -11
  552. data/data/problems/52.yml +5 -4
  553. data/data/problems/53.yml +15 -24
  554. data/data/problems/54.yml +29 -39
  555. data/data/problems/55.yml +16 -17
  556. data/data/problems/56.yml +5 -7
  557. data/data/problems/57.yml +10 -11
  558. data/data/problems/58.yml +11 -18
  559. data/data/problems/59.yml +11 -19
  560. data/data/problems/6.yml +13 -9
  561. data/data/problems/60.yml +5 -6
  562. data/data/problems/61.yml +18 -26
  563. data/data/problems/62.yml +5 -5
  564. data/data/problems/63.yml +5 -3
  565. data/data/problems/64.yml +52 -126
  566. data/data/problems/65.yml +21 -47
  567. data/data/problems/66.yml +13 -23
  568. data/data/problems/67.yml +10 -13
  569. data/data/problems/68.yml +15 -19
  570. data/data/problems/69.yml +18 -10
  571. data/data/problems/7.yml +5 -2
  572. data/data/problems/70.yml +10 -12
  573. data/data/problems/71.yml +11 -13
  574. data/data/problems/72.yml +11 -12
  575. data/data/problems/73.yml +11 -12
  576. data/data/problems/74.yml +25 -37
  577. data/data/problems/75.yml +10 -12
  578. data/data/problems/76.yml +4 -4
  579. data/data/problems/77.yml +4 -4
  580. data/data/problems/78.yml +13 -8
  581. data/data/problems/79.yml +7 -7
  582. data/data/problems/8.yml +14 -8
  583. data/data/problems/80.yml +7 -7
  584. data/data/problems/81.yml +9 -15
  585. data/data/problems/82.yml +10 -15
  586. data/data/problems/83.yml +10 -19
  587. data/data/problems/84.yml +36 -59
  588. data/data/problems/85.yml +7 -5
  589. data/data/problems/86.yml +11 -11
  590. data/data/problems/87.yml +7 -8
  591. data/data/problems/88.yml +30 -49
  592. data/data/problems/89.yml +13 -14
  593. data/data/problems/9.yml +6 -9
  594. data/data/problems/90.yml +16 -18
  595. data/data/problems/91.yml +10 -15
  596. data/data/problems/92.yml +14 -25
  597. data/data/problems/93.yml +13 -17
  598. data/data/problems/94.yml +7 -7
  599. data/data/problems/95.yml +13 -19
  600. data/data/problems/96.yml +24 -40
  601. data/data/problems/97.yml +7 -10
  602. data/data/problems/98.yml +9 -12
  603. data/data/problems/99.yml +9 -12
  604. data/euler-manager.gemspec +1 -0
  605. data/example/1/README.md +4 -4
  606. data/example/15/README.md +8 -0
  607. data/example/15/python/15.py +5 -0
  608. data/example/15/python/euler.py +0 -0
  609. data/example/2/README.md +7 -5
  610. data/example/Eulerfile.rb +1 -0
  611. data/lib/euler/problem.rb +6 -1
  612. data/lib/euler/solution.rb +4 -2
  613. data/lib/euler/version.rb +1 -1
  614. data/rake/clean.rake +16 -0
  615. data/rake/update.rake +88 -0
  616. data/spec/euler/solution_spec.rb +2 -1
  617. data/templates/Eulerfile.rb +12 -0
  618. metadata +189 -29
  619. data/data/problems/431.yml +0 -33
  620. data/data/problems/432.yml +0 -13
  621. data/data/problems/433.yml +0 -18
  622. data/data/problems/434.yml +0 -32
  623. data/data/problems/435.yml +0 -21
  624. data/data/problems/436.yml +0 -21
  625. data/data/problems/437.yml +0 -22
  626. data/data/problems/438.yml +0 -29
  627. data/data/problems/439.yml +0 -17
  628. data/data/problems/440.yml +0 -21
  629. data/data/problems/441.yml +0 -23
  630. data/data/problems/442.yml +0 -9
  631. data/data/problems/443.yml +0 -13
  632. data/data/problems/444.yml +0 -28
  633. data/data/problems/445.yml +0 -37
  634. data/data/problems/446.yml +0 -29
  635. data/data/problems/447.yml +0 -31
  636. data/data/problems/448.yml +0 -14
  637. data/data/problems/449.yml +0 -17
  638. data/data/problems/450.yml +0 -26
  639. data/data/problems/451.yml +0 -15
  640. data/data/problems/452.yml +0 -8
  641. data/data/problems/453.yml +0 -16
  642. data/data/problems/454.yml +0 -17
  643. data/data/problems/455.yml +0 -16
  644. data/data/problems/456.yml +0 -15
  645. data/scripts/update_problems +0 -68
data/data/problems/47.yml CHANGED
@@ -2,20 +2,15 @@
2
2
  :id: 47
3
3
  :name: Distinct primes factors
4
4
  :url: http://projecteuler.net/problem=47
5
- :content: "\r\n<p>The first two consecutive numbers to have two distinct prime factors
6
- are:</p>\r\n<p style=\"margin-left:100px;\">14 = 2 <img src=\"images/symbol_times.gif\"
7
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">
8
- 7<br>15 = 3 <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\"
9
- border=\"0\" style=\"vertical-align:middle;\"> 5</p>\r\n<p>The first three consecutive
10
- numbers to have three distinct prime factors are:</p>\r\n<p style=\"margin-left:100px;\">644
11
- = <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
12
- style=\"vertical-align:middle;\"> 7 <img src=\"images/symbol_times.gif\" width=\"9\"
13
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 23<br>645
14
- = 3 <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
15
- style=\"vertical-align:middle;\"> 5 <img src=\"images/symbol_times.gif\" width=\"9\"
16
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 43<br>646
17
- = 2 <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
18
- style=\"vertical-align:middle;\"> 17 <img src=\"images/symbol_times.gif\" width=\"9\"
19
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 19.</p>\r\n<p>Find
5
+ :content: "The first two consecutive numbers to have two distinct prime factors are:\n\n14
6
+ = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7
7
+ \ \n15 = 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
+ 5\n\nThe first three consecutive numbers to have three distinct prime factors are:\n\n644
9
+ = 2² ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 7
10
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 23 \n645
11
+ = 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 5
12
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 43 \n646
13
+ = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 17
14
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 19.\n\nFind
20
15
  the first four consecutive integers to have four distinct prime factors. What is
21
- the first of these numbers?</p>\r\n\r\n"
16
+ the first of these numbers?\n\n"
data/data/problems/48.yml CHANGED
@@ -2,6 +2,8 @@
2
2
  :id: 48
3
3
  :name: Self powers
4
4
  :url: http://projecteuler.net/problem=48
5
- :content: "\r\n\n<p>The series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ...
6
- + 10<sup>10</sup> = 10405071317.</p>\n<p>Find the last ten digits of the series,
7
- 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 1000<sup>1000</sup>.</p>\n\r\n"
5
+ :content: |+
6
+ The series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 10<sup>10</sup> = 10405071317.
7
+
8
+ Find the last ten digits of the series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 1000<sup>1000</sup>.
9
+
data/data/problems/49.yml CHANGED
@@ -2,9 +2,10 @@
2
2
  :id: 49
3
3
  :name: Prime permutations
4
4
  :url: http://projecteuler.net/problem=49
5
- :content: "\r\n<p>The arithmetic sequence, 1487, 4817, 8147, in which each of the
6
- terms increases by 3330, is unusual in two ways: (i) each of the three terms are
7
- prime, and, (ii) each of the 4-digit numbers are permutations of one another.</p>\r\n<p>There
8
- are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting
9
- this property, but there is one other 4-digit increasing sequence.</p>\r\n<p>What
10
- 12-digit number do you form by concatenating the three terms in this sequence?</p>\r\n\r\n"
5
+ :content: |+
6
+ The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.
7
+
8
+ There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this property, but there is one other 4-digit increasing sequence.
9
+
10
+ What 12-digit number do you form by concatenating the three terms in this sequence?
11
+
data/data/problems/5.yml CHANGED
@@ -2,7 +2,8 @@
2
2
  :id: 5
3
3
  :name: Smallest multiple
4
4
  :url: http://projecteuler.net/problem=5
5
- :content: "\r\n<p>2520 is the smallest number that can be divided by each of the numbers
6
- from 1 to 10 without any remainder.</p>\r\n<p>What is the smallest positive number
7
- that is <dfn title=\"divisible with no remainder\">evenly divisible</dfn> by all
8
- of the numbers from 1 to 20?</p>\r\n\r\n"
5
+ :content: |+
6
+ 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
7
+
8
+ What is the smallest positive number that is <dfn title="divisible with no remainder">evenly divisible</dfn> by all of the numbers from 1 to 20?
9
+
data/data/problems/50.yml CHANGED
@@ -2,9 +2,14 @@
2
2
  :id: 50
3
3
  :name: Consecutive prime sum
4
4
  :url: http://projecteuler.net/problem=50
5
- :content: "\r\n\n<p>The prime 41, can be written as the sum of six consecutive primes:</p>\n<div
6
- style=\"text-align:center;\">41 = 2 + 3 + 5 + 7 + 11 + 13</div>\n<p>This is the
7
- longest sum of consecutive primes that adds to a prime below one-hundred.</p>\n<p>The
8
- longest sum of consecutive primes below one-thousand that adds to a prime, contains
9
- 21 terms, and is equal to 953.</p>\n<p>Which prime, below one-million, can be written
10
- as the sum of the most consecutive primes?</p>\n\r\n"
5
+ :content: |+
6
+ The prime 41, can be written as the sum of six consecutive primes:
7
+
8
+ 41 = 2 + 3 + 5 + 7 + 11 + 13
9
+
10
+ This is the longest sum of consecutive primes that adds to a prime below one-hundred.
11
+
12
+ The longest sum of consecutive primes below one-thousand that adds to a prime, contains 21 terms, and is equal to 953.
13
+
14
+ Which prime, below one-million, can be written as the sum of the most consecutive primes?
15
+
data/data/problems/51.yml CHANGED
@@ -2,14 +2,12 @@
2
2
  :id: 51
3
3
  :name: Prime digit replacements
4
4
  :url: http://projecteuler.net/problem=51
5
- :content: "\r\n<!--<p>By replacing the 1<sup>st</sup> digit of *57, it turns out that
6
- six of the possible values: 157, 257, 457, 557, 757, and 857, are all prime.</p>
7
- -->\r\n<p>By replacing the 1<sup>st</sup> digit of the 2-digit number *3, it turns
8
- out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime.</p>\r\n<p>By
9
- replacing the 3<sup>rd</sup> and 4<sup>th</sup> digits of 56**3 with the same digit,
10
- this 5-digit number is the first example having seven primes among the ten generated
11
- numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993.
12
- Consequently 56003, being the first member of this family, is the smallest prime
13
- with this property.</p>\r\n<p>Find the smallest prime which, by replacing part of
14
- the number (not necessarily adjacent digits) with the same digit, is part of an
15
- eight prime value family.</p>\r\n\r\n"
5
+ :content: |+
6
+ <!--<p>By replacing the 1<sup>st</sup> digit of *57, it turns out that six of the possible values: 157, 257, 457, 557, 757, and 857, are all prime.</p> -->
7
+
8
+ By replacing the 1<sup>st</sup> digit of the 2-digit number \*3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime.
9
+
10
+ By replacing the 3<sup>rd</sup> and 4<sup>th</sup> digits of 56\*\*3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property.
11
+
12
+ Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.
13
+
data/data/problems/52.yml CHANGED
@@ -2,7 +2,8 @@
2
2
  :id: 52
3
3
  :name: Permuted multiples
4
4
  :url: http://projecteuler.net/problem=52
5
- :content: "\r\n\n<p>It can be seen that the number, 125874, and its double, 251748,
6
- contain exactly the same digits, but in a different order.</p>\n<p>Find the smallest
7
- positive integer, <i>x</i>, such that 2<i>x</i>, 3<i>x</i>, 4<i>x</i>, 5<i>x</i>,
8
- and 6<i>x</i>, contain the same digits.</p>\n\r\n"
5
+ :content: |+
6
+ It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
7
+
8
+ Find the smallest positive integer, _x_, such that 2_x_, 3_x_, 4_x_, 5_x_, and 6_x_, contain the same digits.
9
+
data/data/problems/53.yml CHANGED
@@ -2,27 +2,18 @@
2
2
  :id: 53
3
3
  :name: Combinatoric selections
4
4
  :url: http://projecteuler.net/problem=53
5
- :content: "\r\n<p>There are exactly ten ways of selecting three from five, 12345:</p>\r\n<p
6
- style=\"text-align:center;\">123, 124, 125, 134, 135, 145, 234, 235, 245, and 345</p>\r\n<p>In
7
- combinatorics, we use the notation, <sup>5</sup>C<sub>3</sub> = 10.</p>\r\n<p>In
8
- general,</p>\r\n<div style=\"text-align:center;\">\r\n<table><tr>\n<td>\n<sup><var>n</var></sup>C<sub><var>r</var></sub>
9
- = </td>\r\n<td><div style=\"text-align:center;\">\n<var>n</var>!<br><span style=\"border-top:1px
10
- solid #000;\"><var>r</var>!(<var>n<img src=\"images/symbol_minus.gif\" width=\"9\"
11
- height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">r</var>)!</span>\n</div></td>\r\n<td>,where
12
- <var>r</var> <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\"
13
- border=\"0\" style=\"vertical-align:middle;\"><var>n</var>, <var>n</var>! = <var>n</var><img
14
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
15
- style=\"vertical-align:middle;\">(<var>n</var><img src=\"images/symbol_minus.gif\"
16
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">1)<img
17
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
18
- style=\"vertical-align:middle;\">...<img src=\"images/symbol_times.gif\" width=\"9\"
19
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img src=\"images/symbol_times.gif\"
20
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">2<img
21
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
22
- style=\"vertical-align:middle;\">1, and 0! = 1.</td>\r\n</tr></table>\n</div>\r\n<p>It
23
- is not until <var>n</var> = 23, that a value exceeds one-million: <sup>23</sup>C<sub>10</sub>
24
- = 1144066.</p>\r\n<p>How many, not necessarily distinct, values of  <sup><var>n</var></sup>C<sub><var>r</var></sub>,
25
- for 1 <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\"
26
- style=\"vertical-align:middle;\"><var>n</var> <img src=\"images/symbol_le.gif\"
27
- width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">
28
- 100, are greater than one-million?</p>\r\n\r\n"
5
+ :content: "There are exactly ten ways of selecting three from five, 12345:\n\n123,
6
+ 124, 125, 134, 135, 145, 234, 235, 245, and 345\n\nIn combinatorics, we use the
7
+ notation, <sup>5</sup>C<sub>3</sub> = 10.\n\nIn general,\n\n| <sup><var>n</var></sup>C<sub><var>r</var></sub>
8
+ = | \n<var>n</var>! \n<var>r</var>!(<var>n<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
9
+ width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">r</var>)!\n
10
+ | ,where <var>r</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
+ <var>n</var>, <var>n</var>! = <var>n</var> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)(<var>n</var>
12
+ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1) ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)...
13
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)2
14
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)1, and
15
+ 0! = 1. |\n\nIt is not until <var>n</var> = 23, that a value exceeds one-million:
16
+ <sup>23</sup>C<sub>10</sub> = 1144066.\n\nHow many, not necessarily distinct, values
17
+ of  <sup><var>n</var></sup>C<sub><var>r</var></sub>, for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
18
+ <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
19
+ 100, are greater than one-million?\n\n"
data/data/problems/54.yml CHANGED
@@ -2,42 +2,32 @@
2
2
  :id: 54
3
3
  :name: Poker hands
4
4
  :url: http://projecteuler.net/problem=54
5
- :content: "\r\n<p>In the card game poker, a hand consists of five cards and are ranked,
6
- from lowest to highest, in the following way:</p>\r\n<ul>\n<li>\n<b>High Card</b>:
7
- Highest value card.</li>\r\n<li>\n<b>One Pair</b>: Two cards of the same value.</li>\r\n<li>\n<b>Two
8
- Pairs</b>: Two different pairs.</li>\r\n<li>\n<b>Three of a Kind</b>: Three cards
9
- of the same value.</li>\r\n<li>\n<b>Straight</b>: All cards are consecutive values.</li>\r\n<li>\n<b>Flush</b>:
10
- All cards of the same suit.</li>\r\n<li>\n<b>Full House</b>: Three of a kind and
11
- a pair.</li>\r\n<li>\n<b>Four of a Kind</b>: Four cards of the same value.</li>\r\n<li>\n<b>Straight
12
- Flush</b>: All cards are consecutive values of same suit.</li>\r\n<li>\n<b>Royal
13
- Flush</b>: Ten, Jack, Queen, King, Ace, in same suit.</li>\r\n</ul>\n<p>The cards
14
- are valued in the order:<br>2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace.</p>\r\n<p>If
15
- two players have the same ranked hands then the rank made up of the highest value
16
- wins; for example, a pair of eights beats a pair of fives (see example 1 below).
17
- But if two ranks tie, for example, both players have a pair of queens, then highest
18
- cards in each hand are compared (see example 4 below); if the highest cards tie
19
- then the next highest cards are compared, and so on.</p>\r\n<p>Consider the following
20
- five hands dealt to two players:</p>\r\n<div style=\"text-align:center;\">\r\n<table>\n<tr>\n<td><b>Hand</b></td>\n<td> </td>\n<td><b>Player
21
- 1</b></td>\n<td> </td>\n<td><b>Player 2</b></td>\n<td> </td>\n<td><b>Winner</b></td>\r\n</tr>\n<tr>\n<td
22
- style=\"vertical-align:top;\"><b>1</b></td>\n<td> </td>\n<td>5H 5C 6S 7S KD<br><div
23
- class=\"note\">Pair of Fives</div>\n</td>\n<td> </td>\n<td>2C 3S 8S 8D TD<br><div
24
- class=\"note\">Pair of Eights</div>\n</td>\n<td> </td>\n<td style=\"vertical-align:top;\">Player
25
- 2</td>\r\n</tr>\n<tr>\n<td style=\"vertical-align:top;\"><b>2</b></td>\n<td> </td>\n<td>5D
26
- 8C 9S JS AC<br><div class=\"note\">Highest card Ace</div>\n</td>\n<td> </td>\n<td>2C
27
- 5C 7D 8S QH<br><div class=\"note\">Highest card Queen</div>\n</td>\n<td> </td>\n<td
28
- style=\"vertical-align:top;\">Player 1</td>\r\n</tr>\n<tr>\n<td style=\"vertical-align:top;\"><b>3</b></td>\n<td> </td>\n<td>2D
29
- 9C AS AH AC<br><div class=\"note\">Three Aces</div>\n</td>\n<td> </td>\n<td>3D 6D
30
- 7D TD QD<br><div class=\"note\">Flush with Diamonds</div>\n</td>\n<td> </td>\n<td
31
- style=\"vertical-align:top;\">Player 2</td>\r\n</tr>\n<tr>\n<td style=\"vertical-align:top;\"><b>4</b></td>\n<td> </td>\n<td>4D
32
- 6S 9H QH QC<br><div class=\"note\">Pair of Queens<br>Highest card Nine</div>\n</td>\n<td> </td>\n<td>3D
33
- 6D 7H QD QS<br><div class=\"note\">Pair of Queens<br>Highest card Seven</div>\n</td>\n<td> </td>\n<td
34
- style=\"vertical-align:top;\">Player 1</td>\r\n</tr>\n<tr>\n<td style=\"vertical-align:top;\"><b>5</b></td>\n<td> </td>\n<td>2H
35
- 2D 4C 4D 4S<br><div class=\"note\">Full House<br>With Three Fours</div>\n</td>\n<td> </td>\n<td>3C
36
- 3D 3S 9S 9D<br><div class=\"note\">Full House<br>with Three Threes</div>\n</td>\n<td> </td>\n<td
37
- style=\"vertical-align:top;\">Player 1</td>\r\n</tr>\n</table>\n</div>\r\n<p>The
38
- file, <a href=\"project/poker.txt\">poker.txt</a>, contains one-thousand random
39
- hands dealt to two players. Each line of the file contains ten cards (separated
40
- by a single space): the first five are Player 1's cards and the last five are Player
41
- 2's cards. You can assume that all hands are valid (no invalid characters or repeated
42
- cards), each player's hand is in no specific order, and in each hand there is a
43
- clear winner.</p>\r\n<p>How many hands does Player 1 win?</p>\r\n"
5
+ :content: "In the card game poker, a hand consists of five cards and are ranked, from
6
+ lowest to highest, in the following way:\n\n- **High Card** : Highest value card.\n-
7
+ **One Pair** : Two cards of the same value.\n- **Two Pairs** : Two different pairs.\n-
8
+ **Three of a Kind** : Three cards of the same value.\n- **Straight** : All cards
9
+ are consecutive values.\n- **Flush** : All cards of the same suit.\n- **Full House**
10
+ : Three of a kind and a pair.\n- **Four of a Kind** : Four cards of the same value.\n-
11
+ **Straight Flush** : All cards are consecutive values of same suit.\n- **Royal Flush**
12
+ : Ten, Jack, Queen, King, Ace, in same suit.\n\nThe cards are valued in the order:
13
+ \ \n2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace.\n\nIf two players have the
14
+ same ranked hands then the rank made up of the highest value wins; for example,
15
+ a pair of eights beats a pair of fives (see example 1 below). But if two ranks tie,
16
+ for example, both players have a pair of queens, then highest cards in each hand
17
+ are compared (see example 4 below); if the highest cards tie then the next highest
18
+ cards are compared, and so on.\n\nConsider the following five hands dealt to two
19
+ players:\n\n| **Hand** |   | **Player 1** |   | **Player 2** |   | **Winner** |\n|
20
+ **1** |   | 5H 5C 6S 7S KD \n\nPair of Fives\n |   | 2C 3S 8S 8D TD \n\nPair of
21
+ Eights\n |   | Player 2 |\n| **2** |   | 5D 8C 9S JS AC \n\nHighest card Ace\n
22
+ |   | 2C 5C 7D 8S QH \n\nHighest card Queen\n |   | Player 1 |\n| **3** |   | 2D
23
+ 9C AS AH AC \n\nThree Aces\n |   | 3D 6D 7D TD QD \n\nFlush with Diamonds\n |
24
+   | Player 2 |\n| **4** |   | 4D 6S 9H QH QC \n\nPair of Queens \nHighest card
25
+ Nine\n |   | 3D 6D 7H QD QS \n\nPair of Queens \nHighest card Seven\n |   | Player
26
+ 1 |\n| **5** |   | 2H 2D 4C 4D 4S \n\nFull House \nWith Three Fours\n |   | 3C
27
+ 3D 3S 9S 9D \n\nFull House \nwith Three Threes\n |   | Player 1 |\n\nThe file,
28
+ [poker.txt](project/poker.txt), contains one-thousand random hands dealt to two
29
+ players. Each line of the file contains ten cards (separated by a single space):
30
+ the first five are Player 1's cards and the last five are Player 2's cards. You
31
+ can assume that all hands are valid (no invalid characters or repeated cards), each
32
+ player's hand is in no specific order, and in each hand there is a clear winner.\n\nHow
33
+ many hands does Player 1 win?\n\n"
data/data/problems/55.yml CHANGED
@@ -2,20 +2,19 @@
2
2
  :id: 55
3
3
  :name: Lychrel numbers
4
4
  :url: http://projecteuler.net/problem=55
5
- :content: "\r\n<p>If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.</p>\r\n<p>Not
6
- all numbers produce palindromes so quickly. For example,</p>\r\n<p style=\"margin-left:50px;\">349
7
- + 943 = 1292,<br>\r\n1292 + 2921 = 4213<br>\r\n4213 + 3124 = 7337</p>\r\n<p>That
8
- is, 349 took three iterations to arrive at a palindrome.</p>\r\n<p>Although no one
9
- has proved it yet, it is thought that some numbers, like 196, never produce a palindrome.
10
- A number that never forms a palindrome through the reverse and add process is called
11
- a Lychrel number. Due to the theoretical nature of these numbers, and for the purpose
12
- of this problem, we shall assume that a number is Lychrel until proven otherwise.
13
- In addition you are given that for every number below ten-thousand, it will either
14
- (i) become a palindrome in less than fifty iterations, or, (ii) no one, with all
15
- the computing power that exists, has managed so far to map it to a palindrome. In
16
- fact, 10677 is the first number to be shown to require over fifty iterations before
17
- producing a palindrome: 4668731596684224866951378664 (53 iterations, 28-digits).</p>\r\n<p>Surprisingly,
18
- there are palindromic numbers that are themselves Lychrel numbers; the first example
19
- is 4994.</p>\r\n<p>How many Lychrel numbers are there below ten-thousand?</p>\r\n<p
20
- class=\"note\">NOTE: Wording was modified slightly on 24 April 2007 to emphasise
21
- the theoretical nature of Lychrel numbers.</p>\r\n"
5
+ :content: "If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.\n\nNot
6
+ all numbers produce palindromes so quickly. For example,\n\n349 + 943 = 1292, \n\r1292
7
+ + 2921 = 4213 \n\r4213 + 3124 = 7337\n\nThat is, 349 took three iterations to arrive
8
+ at a palindrome.\n\nAlthough no one has proved it yet, it is thought that some numbers,
9
+ like 196, never produce a palindrome. A number that never forms a palindrome through
10
+ the reverse and add process is called a Lychrel number. Due to the theoretical nature
11
+ of these numbers, and for the purpose of this problem, we shall assume that a number
12
+ is Lychrel until proven otherwise. In addition you are given that for every number
13
+ below ten-thousand, it will either (i) become a palindrome in less than fifty iterations,
14
+ or, (ii) no one, with all the computing power that exists, has managed so far to
15
+ map it to a palindrome. In fact, 10677 is the first number to be shown to require
16
+ over fifty iterations before producing a palindrome: 4668731596684224866951378664
17
+ (53 iterations, 28-digits).\n\nSurprisingly, there are palindromic numbers that
18
+ are themselves Lychrel numbers; the first example is 4994.\n\nHow many Lychrel numbers
19
+ are there below ten-thousand?\n\nNOTE: Wording was modified slightly on 24 April
20
+ 2007 to emphasise the theoretical nature of Lychrel numbers.\n\n"
data/data/problems/56.yml CHANGED
@@ -2,10 +2,8 @@
2
2
  :id: 56
3
3
  :name: Powerful digit sum
4
4
  :url: http://projecteuler.net/problem=56
5
- :content: "\r\n\n<p>A googol (10<sup>100</sup>) is a massive number: one followed
6
- by one-hundred zeros; 100<sup>100</sup> is almost unimaginably large: one followed
7
- by two-hundred zeros. Despite their size, the sum of the digits in each number is
8
- only 1.</p>\n<p>Considering natural numbers of the form, <i>a<sup>b</sup></i>, where
9
- <i>a, b</i> <img src=\"images/symbol_lt.gif\" width=\"10\" height=\"10\" alt=\"&lt;\"
10
- border=\"0\" style=\"vertical-align:middle;\"> 100, what is the maximum digital
11
- sum?</p>\n\r\n"
5
+ :content: |+
6
+ A googol (10<sup>100</sup>) is a massive number: one followed by one-hundred zeros; 100<sup>100</sup> is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1.
7
+
8
+ Considering natural numbers of the form, _a<sup>b</sup>_, where _a, b_ ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 100, what is the maximum digital sum?
9
+
data/data/problems/57.yml CHANGED
@@ -2,14 +2,13 @@
2
2
  :id: 57
3
3
  :name: Square root convergents
4
4
  :url: http://projecteuler.net/problem=57
5
- :content: "\r\n<p>It is possible to show that the square root of two can be expressed
6
- as an infinite continued fraction.</p>\r\n<p style=\"text-align:center;\"><img src=\"images/symbol_radic.gif\"
7
- width=\"14\" height=\"16\" alt=\"√\" border=\"0\" style=\"vertical-align:middle;\">
8
- 2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...</p>\r\n<p>By expanding this for
9
- the first four iterations, we get:</p>\r\n<p>1 + 1/2 = 3/2 = 1.5<br>\r\n1 + 1/(2
10
- + 1/2) = 7/5 = 1.4<br>\r\n1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.41666...<br>\r\n1
11
- + 1/(2 + 1/(2 + 1/(2 + 1/2))) = 41/29 = 1.41379...<br></p>\r\n<p>The next three
12
- expansions are 99/70, 239/169, and 577/408, but the eighth expansion, 1393/985,
13
- is the first example where the number of digits in the numerator exceeds the number
14
- of digits in the denominator.</p>\r\n<p>In the first one-thousand expansions, how
15
- many fractions contain a numerator with more digits than denominator?</p>\r\n\r\n"
5
+ :content: "It is possible to show that the square root of two can be expressed as
6
+ an infinite continued fraction.\n\n![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)
7
+ 2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213...\n\nBy expanding this for the
8
+ first four iterations, we get:\n\n1 + 1/2 = 3/2 = 1.5 \n\r1 + 1/(2 + 1/2) = 7/5
9
+ = 1.4 \n\r1 + 1/(2 + 1/(2 + 1/2)) = 17/12 = 1.41666... \n\r1 + 1/(2 + 1/(2 + 1/(2
10
+ + 1/2))) = 41/29 = 1.41379...\n\nThe next three expansions are 99/70, 239/169, and
11
+ 577/408, but the eighth expansion, 1393/985, is the first example where the number
12
+ of digits in the numerator exceeds the number of digits in the denominator.\n\nIn
13
+ the first one-thousand expansions, how many fractions contain a numerator with more
14
+ digits than denominator?\n\n"
data/data/problems/58.yml CHANGED
@@ -2,21 +2,14 @@
2
2
  :id: 58
3
3
  :name: Spiral primes
4
4
  :url: http://projecteuler.net/problem=58
5
- :content: "\r\n<p>Starting with 1 and spiralling anticlockwise in the following way,
6
- a square spiral with side length 7 is formed.</p>\r\n<p style=\"text-align:center;font-family:courier
7
- new;\"><span style=\"color:#ff0000;font-family:courier new;\"><b>37</b></span> 36
8
- 35 34 33 32 <span style=\"color:#ff0000;font-family:courier new;\"><b>31</b></span><br>\r\n38
9
- <span style=\"color:#ff0000;font-family:courier new;\"><b>17</b></span> 16 15 14
10
- <span style=\"color:#ff0000;font-family:courier new;\"><b>13</b></span> 30<br>\r\n39
11
- 18 <span style=\"color:#ff0000;font-family:courier new;\"> <b>5</b></span>  4 <span
12
- style=\"color:#ff0000;font-family:courier new;\"> <b>3</b></span> 12 29<br>\r\n40
13
- 19  6  1  2 11 28<br>\r\n41 20 <span style=\"color:#ff0000;font-family:courier new;\"> <b>7</b></span>
14
-  8  9 10 27<br>\r\n42 21 22 23 24 25 26<br><span style=\"color:#ff0000;font-family:courier
15
- new;\"><b>43</b></span> 44 45 46 47 48 49</p>\r\n<p>It is interesting to note that
16
- the odd squares lie along the bottom right diagonal, but what is more interesting
17
- is that 8 out of the 13 numbers lying along both diagonals are prime; that is, a
18
- ratio of 8/13 <img src=\"images/symbol_asymp.gif\" width=\"11\" height=\"9\" alt=\"≈\"
19
- border=\"0\" style=\"vertical-align:middle;\"> 62%.</p>\r\n<p>If one complete new
20
- layer is wrapped around the spiral above, a square spiral with side length 9 will
21
- be formed. If this process is continued, what is the side length of the square spiral
22
- for which the ratio of primes along both diagonals first falls below 10%?</p>\r\n\r\n"
5
+ :content: "Starting with 1 and spiralling anticlockwise in the following way, a square
6
+ spiral with side length 7 is formed.\n\n**37** 36 35 34 33 32 **31** \n\r38 **17**
7
+ 16 15 14 **13** 30 \n\r39 18   **5**  4   **3** 12 29 \n\r40 19  6  1  2 11 28
8
+ \ \n\r41 20   **7**  8  9 10 27 \n\r42 21 22 23 24 25 26 \n**43** 44 45 46 47
9
+ 48 49\n\nIt is interesting to note that the odd squares lie along the bottom right
10
+ diagonal, but what is more interesting is that 8 out of the 13 numbers lying along
11
+ both diagonals are prime; that is, a ratio of 8/13 ![≈](/home/will/src/euler-manager/config/../data/images/symbol_asymp.gif)
12
+ 62%.\n\nIf one complete new layer is wrapped around the spiral above, a square spiral
13
+ with side length 9 will be formed. If this process is continued, what is the side
14
+ length of the square spiral for which the ratio of primes along both diagonals first
15
+ falls below 10%?\n\n"
data/data/problems/59.yml CHANGED
@@ -2,22 +2,14 @@
2
2
  :id: 59
3
3
  :name: XOR decryption
4
4
  :url: http://projecteuler.net/problem=59
5
- :content: "\r\n\n<p>Each character on a computer is assigned a unique code and the
6
- preferred standard is ASCII (American Standard Code for Information Interchange).
7
- For example, uppercase A = 65, asterisk (*) = 42, and lowercase k = 107.</p>\n<p>A
8
- modern encryption method is to take a text file, convert the bytes to ASCII, then
9
- XOR each byte with a given value, taken from a secret key. The advantage with the
10
- XOR function is that using the same encryption key on the cipher text, restores
11
- the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65.</p>\n<p>For
12
- unbreakable encryption, the key is the same length as the plain text message, and
13
- the key is made up of random bytes. The user would keep the encrypted message and
14
- the encryption key in different locations, and without both \"halves\", it is impossible
15
- to decrypt the message.</p>\n<p>Unfortunately, this method is impractical for most
16
- users, so the modified method is to use a password as a key. If the password is
17
- shorter than the message, which is likely, the key is repeated cyclically throughout
18
- the message. The balance for this method is using a sufficiently long password key
19
- for security, but short enough to be memorable.</p>\n<p>Your task has been made
20
- easy, as the encryption key consists of three lower case characters. Using <a href=\"project/cipher1.txt\">cipher1.txt</a>
21
- (right click and 'Save Link/Target As...'), a file containing the encrypted ASCII
22
- codes, and the knowledge that the plain text must contain common English words,
23
- decrypt the message and find the sum of the ASCII values in the original text.</p>\n\r\n"
5
+ :content: |+
6
+ Each character on a computer is assigned a unique code and the preferred standard is ASCII (American Standard Code for Information Interchange). For example, uppercase A = 65, asterisk (\*) = 42, and lowercase k = 107.
7
+
8
+ A modern encryption method is to take a text file, convert the bytes to ASCII, then XOR each byte with a given value, taken from a secret key. The advantage with the XOR function is that using the same encryption key on the cipher text, restores the plain text; for example, 65 XOR 42 = 107, then 107 XOR 42 = 65.
9
+
10
+ For unbreakable encryption, the key is the same length as the plain text message, and the key is made up of random bytes. The user would keep the encrypted message and the encryption key in different locations, and without both "halves", it is impossible to decrypt the message.
11
+
12
+ Unfortunately, this method is impractical for most users, so the modified method is to use a password as a key. If the password is shorter than the message, which is likely, the key is repeated cyclically throughout the message. The balance for this method is using a sufficiently long password key for security, but short enough to be memorable.
13
+
14
+ Your task has been made easy, as the encryption key consists of three lower case characters. Using [cipher1.txt](project/cipher1.txt) (right click and 'Save Link/Target As...'), a file containing the encrypted ASCII codes, and the knowledge that the plain text must contain common English words, decrypt the message and find the sum of the ASCII values in the original text.
15
+
data/data/problems/6.yml CHANGED
@@ -2,12 +2,16 @@
2
2
  :id: 6
3
3
  :name: Sum square difference
4
4
  :url: http://projecteuler.net/problem=6
5
- :content: "\r\n<p>The sum of the squares of the first ten natural numbers is,</p>\r\n<div
6
- style=\"text-align:center\">1<sup>2</sup> + 2<sup>2</sup> + ... + 10<sup>2</sup>
7
- = 385</div>\r\n<p>The square of the sum of the first ten natural numbers is,</p>\r\n<div
8
- style=\"text-align:center\">(1 + 2 + ... + 10)<sup>2</sup> = 55<sup>2</sup> = 3025</div>\r\n<p>Hence
9
- the difference between the sum of the squares of the first ten natural numbers and
10
- the square of the sum is 3025 <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
11
- alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"> 385 = 2640.</p>\r\n<p>Find
12
- the difference between the sum of the squares of the first one hundred natural numbers
13
- and the square of the sum.</p>\r\n\r\n"
5
+ :content: |+
6
+ The sum of the squares of the first ten natural numbers is,
7
+
8
+ 1<sup>2</sup> + 2<sup>2</sup> + ... + 10<sup>2</sup> = 385
9
+
10
+ The square of the sum of the first ten natural numbers is,
11
+
12
+ (1 + 2 + ... + 10)<sup>2</sup> = 55<sup>2</sup> = 3025
13
+
14
+ Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 385 = 2640.
15
+
16
+ Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
17
+
data/data/problems/60.yml CHANGED
@@ -2,9 +2,8 @@
2
2
  :id: 60
3
3
  :name: Prime pair sets
4
4
  :url: http://projecteuler.net/problem=60
5
- :content: "\r\n\n<p>The primes 3, 7, 109, and 673, are quite remarkable. By taking
6
- any two primes and concatenating them in any order the result will always be prime.
7
- For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four
8
- primes, 792, represents the lowest sum for a set of four primes with this property.</p>\n<p>Find
9
- the lowest sum for a set of five primes for which any two primes concatenate to
10
- produce another prime.</p>\n\r\n"
5
+ :content: |+
6
+ The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for a set of four primes with this property.
7
+
8
+ Find the lowest sum for a set of five primes for which any two primes concatenate to produce another prime.
9
+
data/data/problems/61.yml CHANGED
@@ -2,29 +2,21 @@
2
2
  :id: 61
3
3
  :name: Cyclical figurate numbers
4
4
  :url: http://projecteuler.net/problem=61
5
- :content: "\r\n<p>Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal
6
- numbers are all figurate (polygonal) numbers and are generated by the following
7
- formulae:</p>\r\n<table>\n<tr>\n<td>Triangle</td>\r\n<td> </td>\r\n<td>P<sub>3,<i>n</i></sub>=<i>n</i>(<i>n</i>+1)/2</td>\r\n<td> </td>\r\n<td>1,
8
- 3, 6, 10, 15, ...</td>\r\n</tr>\n<tr>\n<td>Square</td>\r\n<td> </td>\r\n<td>P<sub>4,<i>n</i></sub>=<i>n</i><sup>2</sup>\n</td>\r\n<td> </td>\r\n<td>1,
9
- 4, 9, 16, 25, ...</td>\r\n</tr>\n<tr>\n<td>Pentagonal</td>\r\n<td> </td>\r\n<td>P<sub>5,<i>n</i></sub>=<i>n</i>(3<i>n</i><img
10
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
11
- style=\"vertical-align:middle;\">1)/2</td>\r\n<td> </td>\r\n<td>1, 5, 12, 22, 35,
12
- ...</td>\r\n</tr>\n<tr>\n<td>Hexagonal</td>\r\n<td> </td>\r\n<td>P<sub>6,<i>n</i></sub>=<i>n</i>(2<i>n</i><img
13
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
14
- style=\"vertical-align:middle;\">1)</td>\r\n<td> </td>\r\n<td>1, 6, 15, 28, 45,
15
- ...</td>\r\n</tr>\n<tr>\n<td>Heptagonal</td>\r\n<td> </td>\r\n<td>P<sub>7,<i>n</i></sub>=<i>n</i>(5<i>n</i><img
16
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
17
- style=\"vertical-align:middle;\">3)/2</td>\r\n<td> </td>\r\n<td>1, 7, 18, 34, 55,
18
- ...</td>\r\n</tr>\n<tr>\n<td>Octagonal</td>\r\n<td> </td>\r\n<td>P<sub>8,<i>n</i></sub>=<i>n</i>(3<i>n</i><img
19
- src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
20
- style=\"vertical-align:middle;\">2)</td>\r\n<td> </td>\r\n<td>1, 8, 21, 40, 65,
21
- ...</td>\r\n</tr>\n</table>\n<p>The ordered set of three 4-digit numbers: 8128,
22
- 2882, 8281, has three interesting properties.</p>\r\n<ol>\n<li>The set is cyclic,
23
- in that the last two digits of each number is the first two digits of the next number
24
- (including the last number with the first).</li>\r\n<li>Each polygonal type: triangle
25
- (P<sub>3,127</sub>=8128), square (P<sub>4,91</sub>=8281), and pentagonal (P<sub>5,44</sub>=2882),
26
- is represented by a different number in the set.</li>\r\n<li>This is the only set
27
- of 4-digit numbers with this property.</li>\r\n</ol>\n<p>Find the sum of the only
28
- ordered set of six cyclic 4-digit numbers for which each polygonal type: triangle,
29
- square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different
30
- number in the set.</p>\r\n\r\n"
5
+ :content: |+
6
+ Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae:
7
+
8
+ | Triangle |   | P<sub>3,<i>n</i></sub>=_n_(_n_+1)/2 |   | 1, 3, 6, 10, 15, ... |
9
+ | Square |   | P<sub>4,<i>n</i></sub>=_n_<sup>2</sup> |   | 1, 4, 9, 16, 25, ... |
10
+ | Pentagonal |   | P<sub>5,<i>n</i></sub>=_n_(3_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1)/2 |   | 1, 5, 12, 22, 35, ... |
11
+ | Hexagonal |   | P<sub>6,<i>n</i></sub>=_n_(2_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)1) |   | 1, 6, 15, 28, 45, ... |
12
+ | Heptagonal |   | P<sub>7,<i>n</i></sub>=_n_(5_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)3)/2 |   | 1, 7, 18, 34, 55, ... |
13
+ | Octagonal |   | P<sub>8,<i>n</i></sub>=_n_(3_n_ ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)2) |   | 1, 8, 21, 40, 65, ... |
14
+
15
+ The ordered set of three 4-digit numbers: 8128, 2882, 8281, has three interesting properties.
16
+
17
+ 1. The set is cyclic, in that the last two digits of each number is the first two digits of the next number (including the last number with the first).
18
+ 2. Each polygonal type: triangle (P<sub>3,127</sub>=8128), square (P<sub>4,91</sub>=8281), and pentagonal (P<sub>5,44</sub>=2882), is represented by a different number in the set.
19
+ 3. This is the only set of 4-digit numbers with this property.
20
+
21
+ Find the sum of the only ordered set of six cyclic 4-digit numbers for which each polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different number in the set.
22
+
data/data/problems/62.yml CHANGED
@@ -2,8 +2,8 @@
2
2
  :id: 62
3
3
  :name: Cubic permutations
4
4
  :url: http://projecteuler.net/problem=62
5
- :content: "\r\n<p>The cube, 41063625 (345<sup>3</sup>), can be permuted to produce
6
- two other cubes: 56623104 (384<sup>3</sup>) and 66430125 (405<sup>3</sup>). In fact,
7
- 41063625 is the smallest cube which has exactly three permutations of its digits
8
- which are also cube.</p>\r\n<p>Find the smallest cube for which exactly five permutations
9
- of its digits are cube.</p>\r\n\r\n"
5
+ :content: |+
6
+ The cube, 41063625 (345<sup>3</sup>), can be permuted to produce two other cubes: 56623104 (384<sup>3</sup>) and 66430125 (405<sup>3</sup>). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits which are also cube.
7
+
8
+ Find the smallest cube for which exactly five permutations of its digits are cube.
9
+
data/data/problems/63.yml CHANGED
@@ -2,6 +2,8 @@
2
2
  :id: 63
3
3
  :name: Powerful digit counts
4
4
  :url: http://projecteuler.net/problem=63
5
- :content: "\r\n\n<p>The 5-digit number, 16807=7<sup>5</sup>, is also a fifth power.
6
- Similarly, the 9-digit number, 134217728=8<sup>9</sup>, is a ninth power.</p>\n<p>How
7
- many <i>n</i>-digit positive integers exist which are also an <i>n</i>th power?</p>\n\r\n"
5
+ :content: |+
6
+ The 5-digit number, 16807=7<sup>5</sup>, is also a fifth power. Similarly, the 9-digit number, 134217728=8<sup>9</sup>, is a ninth power.
7
+
8
+ How many _n_-digit positive integers exist which are also an _n_th power?
9
+