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
@@ -2,48 +2,44 @@
2
2
  :id: 352
3
3
  :name: Blood tests
4
4
  :url: http://projecteuler.net/problem=352
5
- :content: "\r\n<p>\r\nEach one of the 25 sheep in a flock must be tested for a rare
6
- virus, known to affect 2% of the sheep population.\r\nAn accurate and extremely
7
- sensitive PCR test exists for blood samples, producing a clear positive / negative
8
- result, but it is very time-consuming and expensive.\r\n</p>\r\n\r\n<p>\r\nBecause
9
- of the high cost, the vet-in-charge suggests that instead of performing 25 separate
10
- tests, the following procedure can be used instead:<br><br>\r\nThe sheep are split
11
- into 5 groups of 5 sheep in each group. \r\nFor each group, the 5 samples are mixed
12
- together and a single test is performed. Then,\r\n</p>\n<ul>\n<li>If the result
13
- is negative, all the sheep in that group are deemed to be virus-free.</li>\r\n<li>If
14
- the result is positive, 5 additional tests will be performed (a separate test for
15
- each animal) to determine the affected individual(s).</li>\r\n</ul>\n<p>\r\nSince
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
7
+ exists for blood samples, producing a clear positive / negative result, but it is
8
+ very time-consuming and expensive.\n\nBecause of the high cost, the vet-in-charge
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.
12
+ Then,\n\n- If the result is negative, all the sheep in that group are deemed to
13
+ be virus-free.\n- If the result is positive, 5 additional tests will be performed
14
+ (a separate test for each animal) to determine the affected individual(s).\n\nSince
16
15
  the probability of infection for any specific animal is only 0.02, the first test
17
- (on the pooled samples) for each group will be:\r\n</p>\n<ul>\n<li>Negative (and
18
- no more tests needed) with probability 0.98<sup>5</sup> = 0.9039207968.</li>\r\n<li>Positive
19
- (5 additional tests needed) with probability 1 - 0.9039207968 = 0.0960792032.</li>\r\n</ul>\n<p>\r\nThus,
20
- the expected number of tests for each group is 1 + 0.0960792032 <img src=\"images/symbol_times.gif\"
21
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">
22
- 5 = 1.480396016.<br>\r\nConsequently, all 5 groups can be screened using an average
23
- of only 1.480396016 <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\"
24
- alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 5 = <b>7.40198008</b> tests,
25
- which represents a huge saving of more than 70% !\r\n</p>\r\n\r\n<p>\r\nAlthough
16
+ (on the pooled samples) for each group will be:\n\n- Negative (and no more tests
17
+ needed) with probability 0.98<sup>5</sup> = 0.9039207968.\n- Positive (5 additional
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 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
20
+ 5 = 1.480396016. \n\rConsequently, all 5 groups can be screened using an average
21
+ of only 1.480396016 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
22
+ 5 = **7.40198008** tests, which represents a huge saving of more than 70% !\n\nAlthough
26
23
  the scheme we have just described seems to be very efficient, it can still be improved
27
24
  considerably (always assuming that the test is sufficiently sensitive and that there
28
- are no adverse effects caused by mixing different samples). E.g.:\r\n</p>\n<ul>\n<li>We
29
- may start by running a test on a mixture of all the 25 samples. It can be verified
30
- that in about 60.35% of the cases this test will be negative, thus no more tests
31
- will be needed. Further testing will only be required for the remaining 39.65% of
32
- the cases.</li>\r\n<li>If we know that at least one animal in a group of 5 is infected
33
- and the first 4 individual tests come out negative, there is no need to run a test
34
- on the fifth animal (we know that it must be infected).</li>\r\n<li>We can try a
35
- different number of groups / different number of animals in each group, adjusting
36
- those numbers at each level so that the total expected number of tests will be minimised.</li>\r\n</ul>\n<p>\r\nTo
37
- simplify the very wide range of possibilities, there is one restriction we place
38
- when devising the most cost-efficient testing scheme: whenever we start with a mixed
39
- sample, all the sheep contributing to that sample must be fully screened (i.e. a
40
- verdict of infected / virus-free must be reached for all of them) before we start
41
- examining any other animals.\r\n</p>\r\nFor the current example, it turns out that
42
- the most cost-efficient testing scheme (we'll call it the <i>optimal strategy</i>)
43
- requires an average of just <b>4.155452</b> tests!\r\n\r\n\r\n<p>\r\nUsing the optimal
44
- strategy, let T(<var>s</var>,<var>p</var>) represent the average number of tests
45
- needed to screen a flock of <var>s</var> sheep for a virus having probability <var>p</var>
46
- to be present in any individual.<br>\r\nThus, rounded to six decimal places, T(25,
47
- 0.02) = 4.155452 and T(25, 0.10) = 12.702124.\r\n</p>\r\n\r\n<p>\r\nFind ΣT(10000,
48
- p) for p=0.01, 0.02, 0.03, ... 0.50.<br>\r\nGive your answer rounded to six decimal
49
- places.\r\n</p>\r\n\r\n"
25
+ are no adverse effects caused by mixing different samples). E.g.:\n\n- We may start
26
+ by running a test on a mixture of all the 25 samples. It can be verified that in
27
+ about 60.35% of the cases this test will be negative, thus no more tests will be
28
+ needed. Further testing will only be required for the remaining 39.65% of the cases.\n-
29
+ If we know that at least one animal in a group of 5 is infected and the first 4
30
+ individual tests come out negative, there is no need to run a test on the fifth
31
+ animal (we know that it must be infected).\n- We can try a different number of groups
32
+ / different number of animals in each group, adjusting those numbers at each level
33
+ so that the total expected number of tests will be minimised.\n\nTo simplify the
34
+ very wide range of possibilities, there is one restriction we place when devising
35
+ the most cost-efficient testing scheme: whenever we start with a mixed sample, all
36
+ the sheep contributing to that sample must be fully screened (i.e. a verdict of
37
+ infected / virus-free must be reached for all of them) before we start examining
38
+ any other animals.\n\n\rFor the current example, it turns out that the most cost-efficient
39
+ testing scheme (we'll call it the _optimal strategy_) requires an average of just
40
+ **4.155452** tests!\r\r\r\n\nUsing the optimal strategy, let T(<var>s</var>,<var>p</var>)
41
+ represent the average number of tests needed to screen a flock of <var>s</var> sheep
42
+ for a virus having probability <var>p</var> to be present in any individual. \n\rThus,
43
+ rounded to six decimal places, T(25, 0.02) = 4.155452 and T(25, 0.10) = 12.702124.\n\nFind
44
+ ΣT(10000, p) for p=0.01, 0.02, 0.03, ... 0.50. \n\rGive your answer rounded to
45
+ six decimal places.\n\n"
@@ -2,24 +2,20 @@
2
2
  :id: 353
3
3
  :name: Risky moon
4
4
  :url: http://projecteuler.net/problem=353
5
- :content: "\r\n<p>\r\nA moon could be described by the sphere C(<var>r</var>) with
6
- centre (0,0,0) and radius <var>r</var>. \r\n</p>\r\n\r\n<p>\r\nThere are stations
7
- on the moon at the points on the surface of C(<var>r</var>) with integer coordinates.
8
- The station at (0,0,<var>r</var>) is called North Pole station, the station at (0,0,-<var>r</var>)
9
- is called South Pole station.\r\n</p>\r\n\r\n<p>\r\nAll stations are connected with
10
- each other via the shortest road on the great arc through the stations. A journey
11
- between two stations is risky. If <var>d</var> is the length of the road between
12
- two stations, (<var>d</var>/(π <var>r</var>))<sup>2</sup> is a measure for the risk
13
- of the journey (let us call it the risk of the road). If the journey includes more
14
- than two stations, the risk of the journey is the sum of risks of the used roads.\r\n</p>\r\n\r\n<p>\r\nA
15
- direct journey from the North Pole station to the South Pole station has the length
16
- π<var>r</var> and risk 1. The journey from the North Pole station to the South Pole
17
- station via (0,<var>r</var>,0) has the same length, but a smaller risk: (½π<var>r</var>/(π<var>r</var>))<sup>2</sup>+(½π<var>r</var>/(π<var>r</var>))<sup>2</sup>=0.5.\r\n</p>\r\n\r\n<p>\r\nThe
18
- minimal risk of a journey from the North Pole station to the South Pole station
19
- on C(<var>r</var>) is M(<var>r</var>).\r\n</p>\r\n\r\n<p>\r\nYou are given that
20
- M(7)=0.1784943998 rounded to 10 digits behind the decimal point. \r\n</p>\r\n\r\n<p>\r\nFind
21
- <img src=\"images/symbol_sum.gif\" width=\"11\" height=\"14\" alt=\"∑\" border=\"0\"
22
- style=\"vertical-align:middle;\">M(2<sup>n</sup>-1) for 1<img src=\"images/symbol_le.gif\"
23
- width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">n<img
24
- src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">15.\r\n</p>\r\n\r\n<p>\r\nGive
25
- your answer rounded to 10 digits behind the decimal point in the form a.bcdefghijk.\r\n</p>\r\n\r\n\r\n"
5
+ :content: |+
6
+ A moon could be described by the sphere C(<var>r</var>) with centre (0,0,0) and radius <var>r</var>.
7
+
8
+ There are stations on the moon at the points on the surface of C(<var>r</var>) with integer coordinates. The station at (0,0,<var>r</var>) is called North Pole station, the station at (0,0,-<var>r</var>) is called South Pole station.
9
+
10
+ All stations are connected with each other via the shortest road on the great arc through the stations. A journey between two stations is risky. If <var>d</var> is the length of the road between two stations, (<var>d</var>/(π <var>r</var>))<sup>2</sup> is a measure for the risk of the journey (let us call it the risk of the road). If the journey includes more than two stations, the risk of the journey is the sum of risks of the used roads.
11
+
12
+ A direct journey from the North Pole station to the South Pole station has the length π<var>r</var> and risk 1. The journey from the North Pole station to the South Pole station via (0,<var>r</var>,0) has the same length, but a smaller risk: (½π<var>r</var>/(π<var>r</var>))<sup>2</sup>+(½π<var>r</var>/(π<var>r</var>))<sup>2</sup>=0.5.
13
+
14
+ The minimal risk of a journey from the North Pole station to the South Pole station on C(<var>r</var>) is M(<var>r</var>).
15
+
16
+ You are given that M(7)=0.1784943998 rounded to 10 digits behind the decimal point.
17
+
18
+ Find ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)M(2<sup>n</sup>-1) for 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)n ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)15.
19
+
20
+ Give your answer rounded to 10 digits behind the decimal point in the form a.bcdefghijk.
21
+
@@ -1,16 +1,14 @@
1
1
  ---
2
2
  :id: 354
3
- :name: 'Distances in a bee''s honeycomb '
3
+ :name: Distances in a bee's honeycomb
4
4
  :url: http://projecteuler.net/problem=354
5
- :content: "\r\n<p>Consider a honey bee's honeycomb where each cell is a perfect regular
6
- hexagon with side length 1.</p>\r\n\r\n<div align=\"center\">\r\n<img src=\"project/images/p_354_bee_honeycomb.png\">\n</div>\r\n\r\n\r\n<p>\r\nOne
7
- particular cell is occupied by the queen bee.<br>\r\nFor a positive real number
8
- <var>L</var>, let B(<var>L</var>) count the cells with distance <var>L</var> from
9
- the queen bee cell (all distances are measured from centre to centre); you may assume
10
- that the honeycomb is large enough to accommodate for any distance we wish to consider.
11
- <br>\r\nFor example, B(<img src=\"images/symbol_radic.gif\" width=\"14\" height=\"16\"
12
- alt=\"√\" border=\"0\" style=\"vertical-align:middle;\">3) = 6, B(<img src=\"images/symbol_radic.gif\"
13
- width=\"14\" height=\"16\" alt=\"√\" border=\"0\" style=\"vertical-align:middle;\">21)
14
- = 12 and B(111 111 111) = 54.</p>\r\n\r\n<p>Find the number of <var>L</var> <img
15
- src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">
16
- 5·10<sup>11</sup> such that B(<var>L</var>) = 450.</p>\r\n"
5
+ :content: "Consider a honey bee's honeycomb where each cell is a perfect regular hexagon
6
+ with side length 1.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_354_bee_honeycomb.png)\n\nOne
7
+ particular cell is occupied by the queen bee. \n\rFor a positive real number <var>L</var>,
8
+ let B(<var>L</var>) count the cells with distance <var>L</var> from the queen bee
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( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)3)
12
+ = 6, B( ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)21)
13
+ = 12 and B(111 111 111) = 54.\n\nFind the number of <var>L</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
14
+ 5·10<sup>11</sup> such that B(<var>L</var>) = 450.\n\n"
@@ -2,7 +2,7 @@
2
2
  :id: 355
3
3
  :name: Maximal coprime subset
4
4
  :url: http://projecteuler.net/problem=355
5
- :content: "\r\n<p>\r\nDefine Co(<var>n</var>) to be the maximal possible sum of a
6
- set of mutually co-prime elements from {1, 2, ..., <var>n</var>}.<br> For example
7
- Co(10) is 30 and hits that maximum on the subset {1, 5, 7, 8, 9}.\r\n</p>\r\n\r\n<p>\r\nYou
8
- are given that Co(30) = 193 and Co(100) = 1356. \r\n</p>\r\n\r\n<p>Find Co(200000).\r\n</p>\r\n\r\n"
5
+ :content: "Define Co(<var>n</var>) to be the maximal possible sum of a set of mutually
6
+ co-prime elements from {1, 2, ..., <var>n</var>}. \n For example Co(10) is 30 and
7
+ hits that maximum on the subset {1, 5, 7, 8, 9}.\n\nYou are given that Co(30) =
8
+ 193 and Co(100) = 1356.\n\nFind Co(200000).\n\n"
@@ -2,9 +2,9 @@
2
2
  :id: 356
3
3
  :name: Largest roots of cubic polynomials
4
4
  :url: http://projecteuler.net/problem=356
5
- :content: "\r\n<p>\r\nLet <var>a</var><sub><var>n</var></sub> be the largest real
6
- root of a polynomial <var>g</var>(x) = x<sup>3</sup> - 2<sup><var>n</var></sup>·x<sup>2</sup>
7
- + <var>n</var>.<br>\r\nFor example, <var>a</var><sub>2</sub> = 3.86619826...</p>\r\n\r\n<p>\r\nFind
8
- the last eight digits of<img style=\"vertical-align:middle\" src=\"project/images/p_356_cubicpoly1.gif\">.</p>\r\n\r\n<p>\r\n<u><i>Note</i></u>:
9
- <img style=\"vertical-align:middle\" src=\"project/images/p_356_cubicpoly2.gif\">
10
- represents the floor function.</p>\r\n\r\n"
5
+ :content: "Let <var>a</var><sub><var>n</var></sub> be the largest real root of a polynomial
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 ![](/home/will/src/euler-manager/config/../data/images/p_356_cubicpoly1.gif).\n\n<u><i>Note</i></u>:
9
+ ![](/home/will/src/euler-manager/config/../data/images/p_356_cubicpoly2.gif) represents
10
+ the floor function.\n\n"
@@ -2,8 +2,8 @@
2
2
  :id: 357
3
3
  :name: Prime generating integers
4
4
  :url: http://projecteuler.net/problem=357
5
- :content: "\r\n<p>\r\nConsider the divisors of 30: 1,2,3,5,6,10,15,30.<br>\r\nIt can
6
- be seen that for every divisor <var>d</var> of 30, <var>d</var>+30/<var>d</var>
7
- is prime.\r\n</p>\r\n<p>\r\nFind the sum of all positive integers <var>n</var> not
8
- exceeding 100 000 000<br>such that\r\nfor every divisor <var>d</var> of <var>n</var>,
9
- <var>d</var>+<var>n</var>/<var>d</var> is prime.\r\n</p>\r\n\r\n"
5
+ :content: "Consider the divisors of 30: 1,2,3,5,6,10,15,30. \n\rIt can be seen that
6
+ for every divisor <var>d</var> of 30, <var>d</var>+30/<var>d</var> is prime.\n\nFind
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>
9
+ is prime.\n\n"
@@ -2,30 +2,21 @@
2
2
  :id: 358
3
3
  :name: Cyclic numbers
4
4
  :url: http://projecteuler.net/problem=358
5
- :content: "\r\n<p>A <b>cyclic number</b> with <var>n</var> digits has a very interesting
6
- property:<br>\r\nWhen it is multiplied by 1, 2, 3, 4, ... <var>n</var>, all the
7
- products have exactly the same digits, in the same order, but rotated in a circular
8
- fashion!\r\n</p>\r\n\r\n<p>\r\nThe smallest cyclic number is the 6-digit number
9
- 142857 :<br>\r\n142857 <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\"
10
- alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 1 = 142857<br>\r\n142857
11
- <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
12
- style=\"vertical-align:middle;\"> 2 = 285714<br>\r\n142857 <img src=\"images/symbol_times.gif\"
13
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">
14
- 3 = 428571<br>\r\n142857 <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\"
15
- alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 4 = 571428<br>\r\n142857
16
- <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
17
- style=\"vertical-align:middle;\"> 5 = 714285<br>\r\n142857 <img src=\"images/symbol_times.gif\"
18
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">
19
- 6 = 857142 \r\n</p>\r\n\r\n<p>\r\nThe next cyclic number is 0588235294117647 with
20
- 16 digits :<br>\r\n0588235294117647 <img src=\"images/symbol_times.gif\" width=\"9\"
21
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 1 = 0588235294117647<br>\r\n0588235294117647
22
- <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
23
- style=\"vertical-align:middle;\"> 2 = 1176470588235294<br>\r\n0588235294117647 <img
24
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
25
- style=\"vertical-align:middle;\"> 3 = 1764705882352941<br>\r\n...<br>\r\n0588235294117647
26
- <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
27
- style=\"vertical-align:middle;\"> 16 = 9411764705882352\r\n</p>\r\n\r\n<p>\r\nNote
28
- that for cyclic numbers, leading zeros are important.\r\n</p>\r\n\r\n<p>\r\nThere
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
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 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
9
+ 1 = 142857 \n\r142857 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
10
+ 2 = 285714 \n\r142857 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
11
+ 3 = 428571 \n\r142857 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
12
+ 4 = 571428 \n\r142857 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
13
+ 5 = 714285 \n\r142857 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
14
+ 6 = 857142\n\nThe next cyclic number is 0588235294117647 with 16 digits : \n\r0588235294117647
15
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 1 = 0588235294117647
16
+ \ \n\r0588235294117647 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
17
+ 2 = 1176470588235294 \n\r0588235294117647 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
18
+ 3 = 1764705882352941 \n\r... \n\r0588235294117647 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
19
+ 16 = 9411764705882352\n\nNote that for cyclic numbers, leading zeros are important.\n\nThere
29
20
  is only one cyclic number for which, the eleven leftmost digits are 00000000137
30
21
  and the five rightmost digits are 56789 (i.e., it has the form 00000000137...56789
31
- with an unknown number of digits in the middle). Find the sum of all its digits.\r\n</p>\r\n\r\n"
22
+ with an unknown number of digits in the middle). Find the sum of all its digits.\n\n"
@@ -2,25 +2,22 @@
2
2
  :id: 359
3
3
  :name: Hilbert's New Hotel
4
4
  :url: http://projecteuler.net/problem=359
5
- :content: "\r\n<p>\r\nAn infinite number of people (numbered 1, 2, 3, etc.) are lined
6
- up to get a room at Hilbert's newest infinite hotel. The hotel contains an infinite
7
- number of floors (numbered 1, 2, 3, etc.), and each floor contains an infinite number
8
- of rooms (numbered 1, 2, 3, etc.). \r\n</p>\r\n\r\n<p>\r\nInitially the hotel is
9
- empty. Hilbert declares a rule on how the <var>n</var><sup>th</sup> person is assigned
10
- a room: person <var>n</var> gets the first vacant room in the lowest numbered floor
11
- satisfying either of the following:\r\n</p>\n<ul>\n<li>the floor is empty</li>\r\n<li>the
12
- floor is not empty, and if the latest person taking a room in that floor is person
13
- <var>m</var>, then <var>m</var> + <var>n</var> is a perfect square</li>\r\n</ul>\n<p>\r\nPerson
14
- 1 gets room 1 in floor 1 since floor 1 is empty.\r\n<br>Person 2 does not get room
15
- 2 in floor 1 since 1 + 2 = 3 is not a perfect square.\r\n<br>Person 2 instead gets
16
- room 1 in floor 2 since floor 2 is empty.\r\n<br>Person 3 gets room 2 in floor 1
17
- since 1 + 3 = 4 is a perfect square.\r\n</p>\r\n\r\n<p>\r\nEventually, every person
18
- in the line gets a room in the hotel.\r\n</p>\r\n\r\n<p>\r\nDefine P(<var>f</var>,
19
- <var>r</var>) to be <var>n</var> if person <var>n</var> occupies room <var>r</var>
20
- in floor <var>f</var>, and 0 if no person occupies the room. Here are a few examples:\r\n<br>P(1,
21
- 1) = 1\r\n<br>P(1, 2) = 3\r\n<br>P(2, 1) = 2\r\n<br>P(10, 20) = 440\r\n<br>P(25,
22
- 75) = 4863\r\n<br>P(99, 100) = 19454\r\n</p>\r\n\r\n<p>\r\nFind the sum of all P(<var>f</var>,
23
- <var>r</var>) for all positive <var>f</var> and <var>r</var> such that <var>f</var>
24
- <img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
25
- style=\"vertical-align:middle;\"><var>r</var> = 71328803586048 and give the last
26
- 8 digits as your answer.\r\n</p>\r\n"
5
+ :content: "An infinite number of people (numbered 1, 2, 3, etc.) are lined up to get
6
+ a room at Hilbert's newest infinite hotel. The hotel contains an infinite number
7
+ of floors (numbered 1, 2, 3, etc.), and each floor contains an infinite number of
8
+ rooms (numbered 1, 2, 3, etc.).\n\nInitially the hotel is empty. Hilbert declares
9
+ a rule on how the <var>n</var><sup>th</sup> person is assigned a room: person <var>n</var>
10
+ gets the first vacant room in the lowest numbered floor satisfying either of the
11
+ following:\n\n- the floor is empty\n- the floor is not empty, and if the latest
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> ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
23
+ <var>r</var> = 71328803586048 and give the last 8 digits as your answer.\n\n"
data/data/problems/36.yml CHANGED
@@ -2,7 +2,10 @@
2
2
  :id: 36
3
3
  :name: Double-base palindromes
4
4
  :url: http://projecteuler.net/problem=36
5
- :content: "\r\n\n<p>The decimal number, 585 = 1001001001<sub>2</sub> (binary), is
6
- palindromic in both bases.</p>\n<p>Find the sum of all numbers, less than one million,
7
- which are palindromic in base 10 and base 2.</p>\n<p class=\"info\">(Please note
8
- that the palindromic number, in either base, may not include leading zeros.)</p>\n\r\n"
5
+ :content: |+
6
+ The decimal number, 585 = 1001001001<sub>2</sub> (binary), is palindromic in both bases.
7
+
8
+ Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
9
+
10
+ (Please note that the palindromic number, in either base, may not include leading zeros.)
11
+
@@ -2,11 +2,11 @@
2
2
  :id: 360
3
3
  :name: Scary Sphere
4
4
  :url: http://projecteuler.net/problem=360
5
- :content: "\r\n<p>\r\nGiven two points (x<sub>1</sub>,y<sub>1</sub>,z<sub>1</sub>)
6
- and (x<sub>2</sub>,y<sub>2</sub>,z<sub>2</sub>) in three dimensional space, the
7
- <b>Manhattan distance</b> between those points is defined as <br> |x<sub>1</sub>-x<sub>2</sub>|+|y<sub>1</sub>-y<sub>2</sub>|+|z<sub>1</sub>-z<sub>2</sub>|.\r\n</p>\r\n<p>\r\nLet
8
- C(<var>r</var>) be a sphere with radius <var>r</var> and center in the origin O(0,0,0).<br>\r\nLet
9
- I(<var>r</var>) be the set of all points with integer coordinates on the surface
10
- of C(<var>r</var>).<br>\r\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.\r\n</p>\r\n<p>\r\nE.g. S(45)=34518.\r\n</p>\r\n<p>\r\nFind
12
- S(10<sup>10</sup>).\r\n</p>\r\n\r\n\r\n\r\n"
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
+ in three dimensional space, the **Manhattan distance** between those points is defined
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
+ 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
12
+ S(10<sup>10</sup>).\n\n"
@@ -2,19 +2,18 @@
2
2
  :id: 361
3
3
  :name: Subsequence of Thue-Morse sequence
4
4
  :url: http://projecteuler.net/problem=361
5
- :content: "\r\n<p>The <b>Thue-Morse sequence</b> {T<sub><var>n</var></sub>} is a binary
6
- sequence satisfying:</p>\r\n<ul>\n<li>T<sub>0</sub> = 0</li>\r\n<li>T<sub>2<var>n</var></sub>
7
- = T<sub><var>n</var></sub>\n</li>\r\n<li>T<sub>2<var>n</var>+1</sub> = 1 - T<sub><var>n</var></sub>\n</li>\r\n</ul>\n<p>\r\nThe
8
- first several terms of {T<sub><var>n</var></sub>} are given as follows:<br>\r\n01101001<span
9
- style=\"color:red;\">10010</span>1101001011001101001....\r\n</p>\r\n\r\n<p>\r\nWe
5
+ :content: "The **Thue-Morse sequence** {T<sub><var>n</var></sub>} is a binary sequence
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
+ 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
10
9
  define {A<sub><var>n</var></sub>} as the sorted sequence of integers such that the
11
- binary expression of each element appears as a subsequence in {T<sub><var>n</var></sub>}.<br>\r\nFor
12
- example, the decimal number 18 is expressed as 10010 in binary. 10010 appears in
13
- {T<sub><var>n</var></sub>} (T<sub>8</sub> to T<sub>12</sub>), so 18 is an element
14
- of {A<sub><var>n</var></sub>}.<br>\r\nThe decimal number 14 is expressed as 1110
15
- in binary. 1110 never appears in {T<sub><var>n</var></sub>}, so 14 is not an element
16
- of {A<sub><var>n</var></sub>}.\r\n</p>\r\n\r\n<p>\r\nThe first several terms of
17
- A<sub><var>n</var></sub> are given as follows:<br></p>\n<div align=\"center\">\r\n<table
18
- cellspacing=\"1\" cellpadding=\"5\" border=\"0\" align=\"center\">\n<tr>\n<td align=\"left\"><var>n</var></td>\n<td>0</td>\n<td>1</td>\n<td>2</td>\n<td>3</td>\n<td>4</td>\n<td>5</td>\n<td>6</td>\n<td>7</td>\n<td>8</td>\n<td>9</td>\n<td>10</td>\n<td>11</td>\n<td>12</td>\n<td>…</td>\n</tr>\n<tr>\n<td>A<sub><var>n</var></sub>\n</td>\n<td>0</td>\n<td>1</td>\n<td>2</td>\n<td>3</td>\n<td>4</td>\n<td>5</td>\n<td>6</td>\n<td>9</td>\n<td>10</td>\n<td>11</td>\n<td>12</td>\n<td>13</td>\n<td>18</td>\n<td>…</td>\n</tr>\n</table>\n</div>\r\n\r\n\r\n<p>\r\nWe
19
- can also verify that A<sub>100</sub> = 3251 and A<sub>1000</sub> = 80852364498.\r\n</p>\r\n\r\n<p>\r\nFind
20
- the last 9 digits of <img style=\"vertical-align:middle\" src=\"project/images/p_361_Thue-Morse1.gif\">.\r\n</p>\r\n"
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>
16
+ are given as follows:\n\n| <var>n</var> | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
17
+ | 10 | 11 | 12 | … |\n| A<sub><var>n</var></sub> | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 9
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 ![](/home/will/src/euler-manager/config/../data/images/p_361_Thue-Morse1.gif).\n\n"
@@ -2,31 +2,19 @@
2
2
  :id: 362
3
3
  :name: Squarefree factors
4
4
  :url: http://projecteuler.net/problem=362
5
- :content: "\r\n<p>\r\nConsider the number 54.<br>\r\n54 can be factored in 7 distinct
6
- ways into one or more factors larger than 1:<br>\r\n54, 2<img src=\"images/symbol_times.gif\"
7
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">27,
8
- 3<img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
9
- style=\"vertical-align:middle;\">18, 6<img src=\"images/symbol_times.gif\" width=\"9\"
10
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">9, 3<img src=\"images/symbol_times.gif\"
11
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img
12
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
13
- style=\"vertical-align:middle;\">6, 2<img src=\"images/symbol_times.gif\" width=\"9\"
14
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img src=\"images/symbol_times.gif\"
15
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">9
16
- and 2<img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
17
- style=\"vertical-align:middle;\">3<img src=\"images/symbol_times.gif\" width=\"9\"
18
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img src=\"images/symbol_times.gif\"
19
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3.<br>\r\nIf
20
- we require that the factors are all squarefree only two ways remain: 3<img src=\"images/symbol_times.gif\"
21
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img
22
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
23
- style=\"vertical-align:middle;\">6 and 2<img src=\"images/symbol_times.gif\" width=\"9\"
24
- height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img src=\"images/symbol_times.gif\"
25
- width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">3<img
26
- src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
27
- style=\"vertical-align:middle;\">3.\r\n</p>\r\n<p>\r\nLet's call Fsf(<var>n</var>)
28
- the number of ways <var>n</var> can be factored into one or more squarefree factors
29
- larger than 1, so\r\nFsf(54)=2.\r\n</p>\r\n<p>\r\nLet S(<var>n</var>) be <img src=\"images/symbol_sum.gif\"
30
- width=\"11\" height=\"14\" alt=\"∑\" border=\"0\" style=\"vertical-align:middle;\">Fsf(<var>k</var>)
31
- for <var>k</var>=2 to <var>n</var>.\r\n</p>\r\n<p>\r\nS(100)=193.\r\n</p>\r\n<p>\r\nFind
32
- S(10 000 000 000). \r\n</p>\r\n\r\n\r\n"
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 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)27,
7
+ 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)18, 6
8
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)9, 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3
9
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)6, 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3
10
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)9 and 2
11
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3
12
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3. \n\rIf
13
+ we require that the factors are all squarefree only two ways remain: 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3
14
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)6 and 2
15
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3
16
+ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3.\n\nLet's
17
+ call Fsf(<var>n</var>) the number of ways <var>n</var> can be factored into one
18
+ or more squarefree factors larger than 1, so\rFsf(54)=2.\n\nLet S(<var>n</var>)
19
+ be ![∑](/home/will/src/euler-manager/config/../data/images/symbol_sum.gif)Fsf(<var>k</var>)
20
+ for <var>k</var>=2 to <var>n</var>.\n\nS(100)=193.\n\nFind S(10 000 000 000).\n\n"
@@ -2,32 +2,31 @@
2
2
  :id: 363
3
3
  :name: Bézier Curves
4
4
  :url: http://projecteuler.net/problem=363
5
- :content: "\r\nA cubic Bézier curve is defined by four points: P<sub>0</sub>, P<sub>1</sub>,
6
- P<sub>2</sub> and P<sub>3</sub>.\r\n<p>\r\n\r\nThe curve is constructed as follows:<br>\r\nOn
5
+ :content: "\rA cubic Bézier curve is defined by four points: P<sub>0</sub>, P<sub>1</sub>,
6
+ P<sub>2</sub> and P<sub>3</sub>.\r\n\nThe curve is constructed as follows: \n\rOn
7
7
  the segments P<sub>0</sub>P<sub>1</sub>, P<sub>1</sub>P<sub>2</sub> and P<sub>2</sub>P<sub>3</sub>
8
- the points Q<sub>0</sub>,Q<sub>1</sub> and Q<sub>2</sub> are drawn such that P<sub>0</sub>Q<sub>0</sub>/P<sub>0</sub>P<sub>1</sub>=P<sub>1</sub>Q<sub>1</sub>/P<sub>1</sub>P<sub>2</sub>=P<sub>2</sub>Q<sub>2</sub>/P<sub>2</sub>P<sub>3</sub>=t
9
- (t in [0,1]).<br>\r\nOn the segments Q<sub>0</sub>Q<sub>1</sub> and Q<sub>1</sub>Q<sub>2</sub>
10
- the points R<sub>0</sub> and R<sub>1</sub> are drawn such that\r\nQ<sub>0</sub>R<sub>0</sub>/Q<sub>0</sub>Q<sub>1</sub>=Q<sub>1</sub>R<sub>1</sub>/Q<sub>1</sub>Q<sub>2</sub>=t
11
- for the same value of t.<br>\r\nOn the segment R<sub>0</sub>R<sub>1</sub> the point
8
+ the points Q<sub>0</sub>,Q<sub>1</sub> and Q<sub>2</sub> are drawn such that P<sub>0</sub>Q<sub>0</sub>/P<sub>0</sub>P<sub>1</sub>=P<sub>1</sub>Q<sub>1</sub>/P<sub>1</sub>P<sub>2</sub>=P<sub>2</sub>Q<sub>2</sub>/P<sub>2</sub>P<sub>3</sub>=t
9
+ (t in [0,1]). \n\rOn the segments Q<sub>0</sub>Q<sub>1</sub> and Q<sub>1</sub>Q<sub>2</sub>
10
+ the points R<sub>0</sub> and R<sub>1</sub> are drawn such that\rQ<sub>0</sub>R<sub>0</sub>/Q<sub>0</sub>Q<sub>1</sub>=Q<sub>1</sub>R<sub>1</sub>/Q<sub>1</sub>Q<sub>2</sub>=t
11
+ for the same value of t. \n\rOn the segment R<sub>0</sub>R<sub>1</sub> the point
12
12
  B is drawn such that R<sub>0</sub>B/R<sub>0</sub>R<sub>1</sub>=t for the same value
13
- of t.\r\nThe Bézier curve defined by the points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub>,
13
+ of t.\rThe Bézier curve defined by the points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub>,
14
14
  P<sub>3</sub> is the locus of B as Q<sub>0</sub> takes all possible positions on
15
15
  the segment P<sub>0</sub>P<sub>1</sub>. (Please note that for all points the value
16
- of t is the same.) \r\n<br></p>\r\n<p><applet code=\"CabriJava.class\" width=\"390\"
17
- height=\"300\" align=\"right\" hspace=\"20\" archive=\"http://projecteuler.net/project/images/bezier/CabriJava.jar\">\r\n
18
- \ <param name=\"lang\" value=\"en\">\n<param name=\"file\" value=\"http://projecteuler.net/project/images/bezier/bezier.fig\">\n<param
19
- name=\"loop\" value=\"true\"></applet>\r\n</p>\r\n\r\n<p>\r\nIn the applet to the
20
- right you can drag the points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub> and P<sub>3</sub>
21
- to see what the Bézier curve (green curve) defined by those points looks like.
22
- You can also drag the point Q<sub>0</sub> along the segment P<sub>0</sub>P<sub>1</sub>.\r\n</p>\r\n<p>\r\nFrom
16
+ of t is the same.)\n\n<applet code=\"CabriJava.class\" width=\"390\" height=\"300\"
17
+ align=\"right\" hspace=\"20\" archive=\"project/images/bezier/CabriJava.jar\">\r\n
18
+ \ <param name=\"lang\" value=\"en\">\r\n <param name=\"file\" value=\"project/images/bezier/bezier.fig\">\r\n
19
+ \ <param name=\"loop\" value=\"true\">\r\n</applet>\n\nIn the applet to the right
20
+ you can drag the points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub> and P<sub>3</sub>
21
+ to see what the Bézier curve (green curve) defined by those points looks like. You
22
+ can also drag the point Q<sub>0</sub> along the segment P<sub>0</sub>P<sub>1</sub>.\n\nFrom
23
23
  the construction it is clear that the Bézier curve will be tangent to the segments
24
- P<sub>0</sub>P<sub>1</sub> in P<sub>0</sub> and P<sub>2</sub>P<sub>3</sub> in P<sub>3</sub>.\r\n</p>\r\n<p>\r\n<br><br><br></p>\r\n<p>\r\nA
24
+ P<sub>0</sub>P<sub>1</sub> in P<sub>0</sub> and P<sub>2</sub>P<sub>3</sub> in P<sub>3</sub>.\n\nA
25
25
  cubic Bézier curve with P<sub>0</sub>=(1,0), P<sub>1</sub>=(1,<var>v</var>), P<sub>2</sub>=(<var>v</var>,1)
26
- and P<sub>3</sub>=(0,1) is used to approximate a quarter circle.<br>\r\nThe value
27
- <var>v</var><img src=\"images/symbol_gt.gif\" width=\"10\" height=\"10\" alt=\"&gt;\"
28
- border=\"0\" style=\"vertical-align:middle;\">0 is chosen such that the area enclosed
29
- by the lines OP<sub>0</sub>, OP<sub>3</sub> and the curve is equal to <sup>π</sup>/<sub>4</sub>
30
- (the area of the quarter circle).\r\n</p>\r\n<p>\r\nBy how many percent does the
31
- length of the curve differ from the length of the quarter circle?<br>\r\nThat is,
32
- if L is the length of the curve, calculate 100*<sup>(L-π/2)</sup>/<sub>(π/2)</sub>.<br>\r\nGive
33
- your answer rounded to 10 digits behind the decimal point.\r\n\r\n\r\n\r\n</p>"
26
+ and P<sub>3</sub>=(0,1) is used to approximate a quarter circle. \n\rThe value
27
+ <var>v</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)0
28
+ is chosen such that the area enclosed by the lines OP<sub>0</sub>, OP<sub>3</sub>
29
+ and the curve is equal to <sup>π</sup>/<sub>4</sub> (the area of the quarter circle).\n\nBy
30
+ how many percent does the length of the curve differ from the length of the quarter
31
+ circle? \n\rThat is, if L is the length of the curve, calculate 100\\*<sup>(L-π/2)</sup>/<sub>(π/2)</sub>.
32
+ \ \n\rGive your answer rounded to 10 digits behind the decimal point.\n\n"
@@ -2,14 +2,12 @@
2
2
  :id: 364
3
3
  :name: Comfortable distance
4
4
  :url: http://projecteuler.net/problem=364
5
- :content: "\r\n<p>\r\nThere are <var>N</var> seats in a row. <var>N</var> people come
6
- after each other to fill the seats according to the following rules:\r\n</p>\n<ol
7
- type=\"1\">\n<li>If there is any seat whose adjacent seat(s) are not occupied take
8
- such a seat.</li>\r\n<li>If there is no such seat and there is any seat for which
9
- only one adjacent seat is occupied take such a seat.</li>\r\n<li>Otherwise take
10
- one of the remaining available seats. </li>\r\n</ol>\r\nLet T(<var>N</var>) be the
11
- number of possibilities that <var>N</var> seats are occupied by <var>N</var> people
12
- with the given rules.<br> The following figure shows T(4)=8.\r\n\r\n\r\n<div align=\"center\">\r\n<img
13
- src=\"project/images/p_364_comf_dist.gif\">\n</div>\r\n\r\n<p>We can verify that
14
- T(10) = 61632 and T(1 000) mod 100 000 007 = 47255094.</p>\r\n<p>Find T(1 000 000)
15
- mod 100 000 007.</p>\r\n"
5
+ :content: "There are <var>N</var> seats in a row. <var>N</var> people come after each
6
+ other to fill the seats according to the following rules:\n\n1. If there is any
7
+ seat whose adjacent seat(s) are not occupied take such a seat.\n2. If there is no
8
+ such seat and there is any seat for which only one adjacent seat is occupied take
9
+ such a seat.\n3. Otherwise take one of the remaining available seats. \n\rLet T(<var>N</var>)
10
+ be the number of possibilities that <var>N</var> seats are occupied by <var>N</var>
11
+ people with the given rules. \n The following figure shows T(4)=8.\r\r\r\n ![](/home/will/src/euler-manager/config/../data/images/p_364_comf_dist.gif)\n\nWe
12
+ can verify that T(10) = 61632 and T(1 000) mod 100 000 007 = 47255094.\n\nFind T(1
13
+ 000 000) mod 100 000 007.\n\n"