euler-manager 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (618) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.travis.yml +2 -1
  4. data/README.md +27 -21
  5. data/Rakefile +3 -2
  6. data/config/config.rb +6 -2
  7. data/data/answers.yml +431 -430
  8. data/data/images/{p_015.gif → p015.gif} +0 -0
  9. data/data/images/{p_068_1.gif → p068_1.gif} +0 -0
  10. data/data/images/{p_068_2.gif → p068_2.gif} +0 -0
  11. data/data/images/{p_085.gif → p085.gif} +0 -0
  12. data/data/images/{p_086.gif → p086.gif} +0 -0
  13. data/data/images/{p_090.gif → p090.gif} +0 -0
  14. data/data/images/{p_091_1.gif → p091_1.gif} +0 -0
  15. data/data/images/{p_091_2.gif → p091_2.gif} +0 -0
  16. data/data/images/{p_107_1.gif → p107_1.gif} +0 -0
  17. data/data/images/{p_107_2.gif → p107_2.gif} +0 -0
  18. data/data/images/{p_109.gif → p109.gif} +0 -0
  19. data/data/images/{p_126.gif → p126.gif} +0 -0
  20. data/data/images/{p_128.gif → p128.gif} +0 -0
  21. data/data/images/{p_138.gif → p138.gif} +0 -0
  22. data/data/images/{p_139.gif → p139.gif} +0 -0
  23. data/data/images/{p_143_torricelli.gif → p143_torricelli.gif} +0 -0
  24. data/data/images/{p_144_1.gif → p144_1.gif} +0 -0
  25. data/data/images/{p_144_2.gif → p144_2.gif} +0 -0
  26. data/data/images/{p_147.gif → p147.gif} +0 -0
  27. data/data/images/{p_150.gif → p150.gif} +0 -0
  28. data/data/images/{p_151.gif → p151.gif} +0 -0
  29. data/data/images/{p_152_sum.gif → p152_sum.gif} +0 -0
  30. data/data/images/{p_153_formule1.gif → p153_formule1.gif} +0 -0
  31. data/data/images/{p_153_formule2.gif → p153_formule2.gif} +0 -0
  32. data/data/images/{p_153_formule5.gif → p153_formule5.gif} +0 -0
  33. data/data/images/{p_153_formule6.gif → p153_formule6.gif} +0 -0
  34. data/data/images/{p_154_pyramid.gif → p154_pyramid.gif} +0 -0
  35. data/data/images/{p_155_capacitors1.gif → p155_capacitors1.gif} +0 -0
  36. data/data/images/{p_155_capsform.gif → p155_capsform.gif} +0 -0
  37. data/data/images/{p_155_capsmu.gif → p155_capsmu.gif} +0 -0
  38. data/data/images/{p_161_k9.gif → p161_k9.gif} +0 -0
  39. data/data/images/{p_161_trio1.gif → p161_trio1.gif} +0 -0
  40. data/data/images/{p_161_trio3.gif → p161_trio3.gif} +0 -0
  41. data/data/images/{p_163.gif → p163.gif} +0 -0
  42. data/data/images/{p_173_square_laminas.gif → p173_square_laminas.gif} +0 -0
  43. data/data/images/{p_177_quad.gif → p177_quad.gif} +0 -0
  44. data/data/images/{p_184.gif → p184.gif} +0 -0
  45. data/data/images/{p_189_colours.gif → p189_colours.gif} +0 -0
  46. data/data/images/{p_189_grid.gif → p189_grid.gif} +0 -0
  47. data/data/images/{p_194_Fig.png → p194_Fig.png} +0 -0
  48. data/data/images/{p_194_GraphA.png → p194_GraphA.png} +0 -0
  49. data/data/images/{p_194_GraphB.png → p194_GraphB.png} +0 -0
  50. data/data/images/{p_199_circles_in_circles.gif → p199_circles_in_circles.gif} +0 -0
  51. data/data/images/{p_201_laserbeam.gif → p201_laserbeam.gif} +0 -0
  52. data/data/images/{p_208_robotwalk.gif → p208_robotwalk.gif} +0 -0
  53. data/data/images/{p_215_crackfree.gif → p215_crackfree.gif} +0 -0
  54. data/data/images/{p_220.gif → p220.gif} +0 -0
  55. data/data/images/{p_226_formula.gif → p226_formula.gif} +0 -0
  56. data/data/images/{p_226_scoop2.gif → p226_scoop2.gif} +0 -0
  57. data/data/images/{p_228.png → p228.png} +0 -0
  58. data/data/images/{p_237.gif → p237.gif} +0 -0
  59. data/data/images/{p_244_example.gif → p244_example.gif} +0 -0
  60. data/data/images/{p_244_start.gif → p244_start.gif} +0 -0
  61. data/data/images/{p_244_target.gif → p244_target.gif} +0 -0
  62. data/data/images/{p_246_anim.gif → p246_anim.gif} +0 -0
  63. data/data/images/{p_246_ellipse.gif → p246_ellipse.gif} +0 -0
  64. data/data/images/{p_247_hypersquares.gif → p247_hypersquares.gif} +0 -0
  65. data/data/images/{p_251_cardano.gif → p251_cardano.gif} +0 -0
  66. data/data/images/{p_252_convexhole.gif → p252_convexhole.gif} +0 -0
  67. data/data/images/{p_255_Example.gif → p255_Example.gif} +0 -0
  68. data/data/images/{p_255_Heron.gif → p255_Heron.gif} +0 -0
  69. data/data/images/{p_256_tatami3.gif → p256_tatami3.gif} +0 -0
  70. data/data/images/{p_257_bisector.gif → p257_bisector.gif} +0 -0
  71. data/data/images/{p_262_formula1.gif → p262_formula1.gif} +0 -0
  72. data/data/images/{p_264_TriangleCentres.gif → p264_TriangleCentres.gif} +0 -0
  73. data/data/images/{p_265_BinaryCircles.gif → p265_BinaryCircles.gif} +0 -0
  74. data/data/images/{p_270_CutSquare.gif → p270_CutSquare.gif} +0 -0
  75. data/data/images/{p_275_sculptures2.gif → p275_sculptures2.gif} +0 -0
  76. data/data/images/{p_281_pizza.gif → p281_pizza.gif} +0 -0
  77. data/data/images/{p_282_formula.gif → p282_formula.gif} +0 -0
  78. data/data/images/{p_282formula3.gif → p282formula3.gif} +0 -0
  79. data/data/images/{p_287_quadtree.gif → p287_quadtree.gif} +0 -0
  80. data/data/images/{p_289_euler.gif → p289_euler.gif} +0 -0
  81. data/data/images/{p_291_formula.gif → p291_formula.gif} +0 -0
  82. data/data/images/{p_299_ThreeSimTri.gif → p299_ThreeSimTri.gif} +0 -0
  83. data/data/images/{p_300_protein.gif → p300_protein.gif} +0 -0
  84. data/data/images/{p_306_pstrip.gif → p306_pstrip.gif} +0 -0
  85. data/data/images/{p_309_ladders.gif → p309_ladders.gif} +0 -0
  86. data/data/images/{p_311_biclinic.gif → p311_biclinic.gif} +0 -0
  87. data/data/images/{p_312_sierpinsky8t.gif → p312_sierpinsky8t.gif} +0 -0
  88. data/data/images/{p_312_sierpinskyAt.gif → p312_sierpinskyAt.gif} +0 -0
  89. data/data/images/{p_313_sliding_game_1.gif → p313_sliding_game_1.gif} +0 -0
  90. data/data/images/{p_313_sliding_game_2.gif → p313_sliding_game_2.gif} +0 -0
  91. data/data/images/{p_314_landgrab.gif → p314_landgrab.gif} +0 -0
  92. data/data/images/{p_315_clocks.gif → p315_clocks.gif} +0 -0
  93. data/data/images/{p_316_decexp1.gif → p316_decexp1.gif} +0 -0
  94. data/data/images/{p_316_decexp2.gif → p316_decexp2.gif} +0 -0
  95. data/data/images/{p_316_decexp3.gif → p316_decexp3.gif} +0 -0
  96. data/data/images/{p_321_swapping_counters_1.gif → p321_swapping_counters_1.gif} +0 -0
  97. data/data/images/{p_321_swapping_counters_2.gif → p321_swapping_counters_2.gif} +0 -0
  98. data/data/images/{p_326_formula1.gif → p326_formula1.gif} +0 -0
  99. data/data/images/{p_326_formula2.gif → p326_formula2.gif} +0 -0
  100. data/data/images/{p_327_rooms_of_doom.gif → p327_rooms_of_doom.gif} +0 -0
  101. data/data/images/{p_328_sum1.gif → p328_sum1.gif} +0 -0
  102. data/data/images/{p_328_sum2.gif → p328_sum2.gif} +0 -0
  103. data/data/images/{p_330_formula.gif → p330_formula.gif} +0 -0
  104. data/data/images/{p_331_crossflips1.gif → p331_crossflips1.gif} +0 -0
  105. data/data/images/{p_331_crossflips2.gif → p331_crossflips2.gif} +0 -0
  106. data/data/images/{p_331_crossflips3.gif → p331_crossflips3.gif} +0 -0
  107. data/data/images/{p_332_spherical.jpg → p332_spherical.jpg} +0 -0
  108. data/data/images/{p_332_sum.gif → p332_sum.gif} +0 -0
  109. data/data/images/{p_334_beans.gif → p334_beans.gif} +0 -0
  110. data/data/images/{p_334_cases.gif → p334_cases.gif} +0 -0
  111. data/data/images/{p_334_lfloor.gif → p334_lfloor.gif} +0 -0
  112. data/data/images/{p_334_oplus.gif → p334_oplus.gif} +0 -0
  113. data/data/images/{p_334_rfloor.gif → p334_rfloor.gif} +0 -0
  114. data/data/images/{p_335_mancala.gif → p335_mancala.gif} +0 -0
  115. data/data/images/{p_335_sum.gif → p335_sum.gif} +0 -0
  116. data/data/images/{p_336_maximix.gif → p336_maximix.gif} +0 -0
  117. data/data/images/{p_338_gridpaper.gif → p338_gridpaper.gif} +0 -0
  118. data/data/images/{p_340_formula.gif → p340_formula.gif} +0 -0
  119. data/data/images/{p_344_silverdollar.gif → p344_silverdollar.gif} +0 -0
  120. data/data/images/{p_351_hexorchard.png → p351_hexorchard.png} +0 -0
  121. data/data/images/{p_354_bee_honeycomb.png → p354_bee_honeycomb.png} +0 -0
  122. data/data/images/{p_356_cubicpoly1.gif → p356_cubicpoly1.gif} +0 -0
  123. data/data/images/{p_356_cubicpoly2.gif → p356_cubicpoly2.gif} +0 -0
  124. data/data/images/{p_361_Thue-Morse1.gif → p361_Thue-Morse1.gif} +0 -0
  125. data/data/images/p363_bezier.png +0 -0
  126. data/data/images/{p_364_comf_dist.gif → p364_comf_dist.gif} +0 -0
  127. data/data/images/{p_372_pencilray1.jpg → p372_pencilray1.jpg} +0 -0
  128. data/data/images/{p_372_pencilray2.gif → p372_pencilray2.gif} +0 -0
  129. data/data/images/{p_380_mazes.gif → p380_mazes.gif} +0 -0
  130. data/data/images/{p_384_formula.gif → p384_formula.gif} +0 -0
  131. data/data/images/{p_385_ellipsetriangle.png → p385_ellipsetriangle.png} +0 -0
  132. data/data/images/{p_394_eatpie.gif → p394_eatpie.gif} +0 -0
  133. data/data/images/{p_395_pythagorean.gif → p395_pythagorean.gif} +0 -0
  134. data/data/images/{p_404_c_ellipse.gif → p404_c_ellipse.gif} +0 -0
  135. data/data/images/{p_405_tile1.png → p405_tile1.png} +0 -0
  136. data/data/images/{p_405_tile2.gif → p405_tile2.gif} +0 -0
  137. data/data/images/{p_420_matrix.gif → p420_matrix.gif} +0 -0
  138. data/data/images/{p_424_kakuro1.gif → p424_kakuro1.gif} +0 -0
  139. data/data/images/{p_426_baxball1.gif → p426_baxball1.gif} +0 -0
  140. data/data/images/{p_426_baxball2.gif → p426_baxball2.gif} +0 -0
  141. data/data/images/{p_430_flips.gif → p430_flips.gif} +0 -0
  142. data/data/problems/1.yml +1 -1
  143. data/data/problems/10.yml +6 -4
  144. data/data/problems/100.yml +2 -2
  145. data/data/problems/101.yml +15 -19
  146. data/data/problems/102.yml +9 -10
  147. data/data/problems/103.yml +7 -8
  148. data/data/problems/104.yml +2 -2
  149. data/data/problems/105.yml +4 -4
  150. data/data/problems/106.yml +3 -3
  151. data/data/problems/107.yml +12 -12
  152. data/data/problems/108.yml +8 -14
  153. data/data/problems/109.yml +12 -11
  154. data/data/problems/11.yml +21 -24
  155. data/data/problems/110.yml +9 -10
  156. data/data/problems/111.yml +1 -1
  157. data/data/problems/112.yml +1 -1
  158. data/data/problems/113.yml +1 -1
  159. data/data/problems/114.yml +2 -2
  160. data/data/problems/115.yml +1 -1
  161. data/data/problems/116.yml +11 -11
  162. data/data/problems/117.yml +3 -3
  163. data/data/problems/118.yml +1 -1
  164. data/data/problems/119.yml +1 -1
  165. data/data/problems/12.yml +6 -6
  166. data/data/problems/120.yml +4 -4
  167. data/data/problems/121.yml +1 -1
  168. data/data/problems/122.yml +10 -18
  169. data/data/problems/123.yml +3 -3
  170. data/data/problems/124.yml +17 -19
  171. data/data/problems/125.yml +1 -1
  172. data/data/problems/126.yml +12 -11
  173. data/data/problems/127.yml +8 -8
  174. data/data/problems/128.yml +3 -3
  175. data/data/problems/129.yml +1 -1
  176. data/data/problems/13.yml +1 -1
  177. data/data/problems/130.yml +6 -7
  178. data/data/problems/131.yml +2 -2
  179. data/data/problems/132.yml +2 -2
  180. data/data/problems/133.yml +2 -2
  181. data/data/problems/134.yml +3 -3
  182. data/data/problems/135.yml +3 -3
  183. data/data/problems/136.yml +3 -3
  184. data/data/problems/137.yml +9 -9
  185. data/data/problems/138.yml +5 -5
  186. data/data/problems/139.yml +2 -2
  187. data/data/problems/14.yml +8 -13
  188. data/data/problems/140.yml +5 -5
  189. data/data/problems/141.yml +2 -2
  190. data/data/problems/142.yml +3 -4
  191. data/data/problems/143.yml +3 -3
  192. data/data/problems/144.yml +4 -4
  193. data/data/problems/145.yml +1 -1
  194. data/data/problems/146.yml +1 -1
  195. data/data/problems/147.yml +6 -6
  196. data/data/problems/148.yml +8 -8
  197. data/data/problems/149.yml +12 -25
  198. data/data/problems/15.yml +4 -4
  199. data/data/problems/150.yml +16 -17
  200. data/data/problems/151.yml +3 -3
  201. data/data/problems/152.yml +2 -2
  202. data/data/problems/153.yml +30 -35
  203. data/data/problems/154.yml +16 -12
  204. data/data/problems/155.yml +7 -6
  205. data/data/problems/156.yml +8 -9
  206. data/data/problems/157.yml +4 -6
  207. data/data/problems/158.yml +12 -12
  208. data/data/problems/159.yml +14 -16
  209. data/data/problems/16.yml +1 -1
  210. data/data/problems/160.yml +3 -3
  211. data/data/problems/161.yml +6 -6
  212. data/data/problems/162.yml +3 -3
  213. data/data/problems/163.yml +3 -3
  214. data/data/problems/164.yml +3 -4
  215. data/data/problems/165.yml +12 -12
  216. data/data/problems/166.yml +6 -8
  217. data/data/problems/167.yml +6 -7
  218. data/data/problems/168.yml +5 -7
  219. data/data/problems/169.yml +2 -2
  220. data/data/problems/17.yml +5 -5
  221. data/data/problems/170.yml +9 -10
  222. data/data/problems/171.yml +4 -5
  223. data/data/problems/172.yml +3 -4
  224. data/data/problems/173.yml +2 -2
  225. data/data/problems/174.yml +4 -4
  226. data/data/problems/175.yml +12 -13
  227. data/data/problems/176.yml +1 -1
  228. data/data/problems/177.yml +2 -2
  229. data/data/problems/178.yml +6 -6
  230. data/data/problems/179.yml +4 -4
  231. data/data/problems/18.yml +11 -12
  232. data/data/problems/180.yml +9 -12
  233. data/data/problems/181.yml +1 -1
  234. data/data/problems/182.yml +14 -16
  235. data/data/problems/183.yml +12 -15
  236. data/data/problems/184.yml +3 -3
  237. data/data/problems/185.yml +11 -11
  238. data/data/problems/186.yml +10 -11
  239. data/data/problems/187.yml +8 -8
  240. data/data/problems/188.yml +4 -4
  241. data/data/problems/189.yml +4 -4
  242. data/data/problems/19.yml +1 -1
  243. data/data/problems/190.yml +2 -2
  244. data/data/problems/191.yml +5 -5
  245. data/data/problems/192.yml +10 -14
  246. data/data/problems/193.yml +1 -1
  247. data/data/problems/194.yml +10 -10
  248. data/data/problems/195.yml +5 -6
  249. data/data/problems/196.yml +15 -14
  250. data/data/problems/197.yml +7 -8
  251. data/data/problems/198.yml +8 -14
  252. data/data/problems/199.yml +3 -3
  253. data/data/problems/2.yml +8 -7
  254. data/data/problems/20.yml +4 -9
  255. data/data/problems/200.yml +7 -8
  256. data/data/problems/201.yml +14 -14
  257. data/data/problems/202.yml +2 -2
  258. data/data/problems/203.yml +21 -13
  259. data/data/problems/204.yml +7 -7
  260. data/data/problems/205.yml +6 -6
  261. data/data/problems/206.yml +1 -1
  262. data/data/problems/207.yml +10 -10
  263. data/data/problems/208.yml +4 -5
  264. data/data/problems/209.yml +6 -6
  265. data/data/problems/21.yml +7 -7
  266. data/data/problems/210.yml +6 -6
  267. data/data/problems/211.yml +2 -2
  268. data/data/problems/212.yml +16 -20
  269. data/data/problems/213.yml +6 -6
  270. data/data/problems/214.yml +9 -10
  271. data/data/problems/215.yml +5 -5
  272. data/data/problems/216.yml +5 -6
  273. data/data/problems/217.yml +7 -12
  274. data/data/problems/218.yml +9 -10
  275. data/data/problems/219.yml +5 -5
  276. data/data/problems/22.yml +3 -3
  277. data/data/problems/220.yml +15 -16
  278. data/data/problems/221.yml +8 -8
  279. data/data/problems/222.yml +1 -1
  280. data/data/problems/223.yml +5 -6
  281. data/data/problems/224.yml +5 -6
  282. data/data/problems/225.yml +2 -2
  283. data/data/problems/226.yml +8 -9
  284. data/data/problems/227.yml +3 -3
  285. data/data/problems/228.yml +17 -16
  286. data/data/problems/229.yml +16 -19
  287. data/data/problems/23.yml +1 -3
  288. data/data/problems/230.yml +9 -11
  289. data/data/problems/231.yml +5 -8
  290. data/data/problems/232.yml +1 -1
  291. data/data/problems/233.yml +2 -2
  292. data/data/problems/234.yml +11 -13
  293. data/data/problems/235.yml +2 -2
  294. data/data/problems/236.yml +13 -19
  295. data/data/problems/237.yml +4 -4
  296. data/data/problems/238.yml +16 -19
  297. data/data/problems/239.yml +2 -2
  298. data/data/problems/24.yml +2 -2
  299. data/data/problems/240.yml +7 -7
  300. data/data/problems/241.yml +4 -7
  301. data/data/problems/242.yml +5 -6
  302. data/data/problems/243.yml +13 -13
  303. data/data/problems/244.yml +15 -15
  304. data/data/problems/245.yml +8 -20
  305. data/data/problems/246.yml +11 -12
  306. data/data/problems/247.yml +11 -12
  307. data/data/problems/248.yml +1 -1
  308. data/data/problems/249.yml +2 -2
  309. data/data/problems/25.yml +8 -12
  310. data/data/problems/250.yml +4 -4
  311. data/data/problems/251.yml +4 -4
  312. data/data/problems/252.yml +13 -20
  313. data/data/problems/253.yml +9 -8
  314. data/data/problems/254.yml +3 -3
  315. data/data/problems/255.yml +15 -37
  316. data/data/problems/256.yml +19 -24
  317. data/data/problems/257.yml +8 -10
  318. data/data/problems/258.yml +9 -7
  319. data/data/problems/259.yml +1 -1
  320. data/data/problems/26.yml +11 -11
  321. data/data/problems/260.yml +15 -18
  322. data/data/problems/261.yml +15 -13
  323. data/data/problems/262.yml +15 -14
  324. data/data/problems/263.yml +13 -13
  325. data/data/problems/264.yml +10 -11
  326. data/data/problems/265.yml +2 -2
  327. data/data/problems/266.yml +7 -7
  328. data/data/problems/267.yml +1 -1
  329. data/data/problems/268.yml +1 -1
  330. data/data/problems/269.yml +3 -3
  331. data/data/problems/27.yml +12 -15
  332. data/data/problems/270.yml +4 -4
  333. data/data/problems/271.yml +5 -6
  334. data/data/problems/272.yml +5 -7
  335. data/data/problems/273.yml +4 -4
  336. data/data/problems/274.yml +4 -5
  337. data/data/problems/275.yml +4 -4
  338. data/data/problems/276.yml +5 -6
  339. data/data/problems/277.yml +7 -8
  340. data/data/problems/278.yml +16 -19
  341. data/data/problems/279.yml +3 -4
  342. data/data/problems/28.yml +6 -6
  343. data/data/problems/280.yml +2 -2
  344. data/data/problems/281.yml +4 -6
  345. data/data/problems/282.yml +3 -3
  346. data/data/problems/283.yml +6 -7
  347. data/data/problems/284.yml +7 -8
  348. data/data/problems/285.yml +4 -4
  349. data/data/problems/286.yml +2 -2
  350. data/data/problems/287.yml +19 -24
  351. data/data/problems/288.yml +7 -8
  352. data/data/problems/289.yml +11 -11
  353. data/data/problems/29.yml +10 -13
  354. data/data/problems/290.yml +3 -4
  355. data/data/problems/291.yml +4 -4
  356. data/data/problems/292.yml +5 -6
  357. data/data/problems/293.yml +9 -10
  358. data/data/problems/294.yml +12 -7
  359. data/data/problems/295.yml +11 -13
  360. data/data/problems/296.yml +9 -9
  361. data/data/problems/297.yml +7 -9
  362. data/data/problems/298.yml +32 -40
  363. data/data/problems/299.yml +17 -19
  364. data/data/problems/3.yml +6 -4
  365. data/data/problems/30.yml +1 -1
  366. data/data/problems/300.yml +14 -14
  367. data/data/problems/301.yml +9 -10
  368. data/data/problems/302.yml +5 -5
  369. data/data/problems/303.yml +4 -4
  370. data/data/problems/304.yml +7 -9
  371. data/data/problems/305.yml +4 -5
  372. data/data/problems/306.yml +10 -12
  373. data/data/problems/307.yml +4 -4
  374. data/data/problems/308.yml +4 -4
  375. data/data/problems/309.yml +11 -9
  376. data/data/problems/31.yml +2 -2
  377. data/data/problems/310.yml +6 -9
  378. data/data/problems/311.yml +10 -12
  379. data/data/problems/312.yml +10 -9
  380. data/data/problems/313.yml +5 -5
  381. data/data/problems/314.yml +8 -9
  382. data/data/problems/315.yml +35 -38
  383. data/data/problems/316.yml +17 -16
  384. data/data/problems/317.yml +8 -7
  385. data/data/problems/318.yml +14 -29
  386. data/data/problems/319.yml +10 -12
  387. data/data/problems/32.yml +2 -2
  388. data/data/problems/320.yml +2 -2
  389. data/data/problems/321.yml +12 -11
  390. data/data/problems/322.yml +4 -5
  391. data/data/problems/323.yml +7 -9
  392. data/data/problems/324.yml +7 -9
  393. data/data/problems/325.yml +2 -2
  394. data/data/problems/326.yml +3 -3
  395. data/data/problems/327.yml +19 -22
  396. data/data/problems/328.yml +23 -23
  397. data/data/problems/329.yml +6 -6
  398. data/data/problems/33.yml +2 -2
  399. data/data/problems/330.yml +12 -16
  400. data/data/problems/331.yml +16 -18
  401. data/data/problems/332.yml +10 -10
  402. data/data/problems/333.yml +15 -16
  403. data/data/problems/334.yml +17 -19
  404. data/data/problems/335.yml +3 -3
  405. data/data/problems/336.yml +5 -5
  406. data/data/problems/337.yml +7 -8
  407. data/data/problems/338.yml +18 -24
  408. data/data/problems/339.yml +3 -3
  409. data/data/problems/34.yml +1 -1
  410. data/data/problems/340.yml +7 -7
  411. data/data/problems/341.yml +4 -5
  412. data/data/problems/342.yml +6 -9
  413. data/data/problems/343.yml +8 -13
  414. data/data/problems/344.yml +8 -8
  415. data/data/problems/345.yml +17 -16
  416. data/data/problems/346.yml +6 -6
  417. data/data/problems/347.yml +8 -10
  418. data/data/problems/348.yml +5 -5
  419. data/data/problems/349.yml +4 -4
  420. data/data/problems/35.yml +1 -1
  421. data/data/problems/350.yml +5 -6
  422. data/data/problems/351.yml +7 -7
  423. data/data/problems/352.yml +13 -14
  424. data/data/problems/353.yml +2 -2
  425. data/data/problems/354.yml +6 -8
  426. data/data/problems/355.yml +4 -4
  427. data/data/problems/356.yml +5 -4
  428. data/data/problems/357.yml +3 -3
  429. data/data/problems/358.yml +11 -16
  430. data/data/problems/359.yml +12 -12
  431. data/data/problems/36.yml +1 -1
  432. data/data/problems/360.yml +4 -4
  433. data/data/problems/361.yml +9 -9
  434. data/data/problems/362.yml +8 -15
  435. data/data/problems/363.yml +29 -29
  436. data/data/problems/364.yml +4 -4
  437. data/data/problems/365.yml +3 -3
  438. data/data/problems/366.yml +16 -19
  439. data/data/problems/367.yml +11 -11
  440. data/data/problems/368.yml +14 -18
  441. data/data/problems/369.yml +2 -2
  442. data/data/problems/37.yml +1 -1
  443. data/data/problems/370.yml +4 -4
  444. data/data/problems/371.yml +5 -5
  445. data/data/problems/372.yml +6 -7
  446. data/data/problems/373.yml +10 -6
  447. data/data/problems/374.yml +11 -13
  448. data/data/problems/375.yml +11 -14
  449. data/data/problems/376.yml +19 -19
  450. data/data/problems/377.yml +5 -5
  451. data/data/problems/378.yml +8 -9
  452. data/data/problems/379.yml +10 -9
  453. data/data/problems/38.yml +9 -11
  454. data/data/problems/380.yml +8 -10
  455. data/data/problems/381.yml +6 -10
  456. data/data/problems/382.yml +12 -13
  457. data/data/problems/383.yml +5 -6
  458. data/data/problems/384.yml +14 -18
  459. data/data/problems/385.yml +12 -14
  460. data/data/problems/386.yml +4 -5
  461. data/data/problems/387.yml +13 -14
  462. data/data/problems/388.yml +6 -6
  463. data/data/problems/389.yml +3 -3
  464. data/data/problems/39.yml +2 -2
  465. data/data/problems/390.yml +12 -8
  466. data/data/problems/391.yml +18 -20
  467. data/data/problems/392.yml +9 -9
  468. data/data/problems/393.yml +8 -8
  469. data/data/problems/394.yml +14 -15
  470. data/data/problems/395.yml +16 -15
  471. data/data/problems/396.yml +13 -16
  472. data/data/problems/397.yml +4 -6
  473. data/data/problems/398.yml +8 -9
  474. data/data/problems/399.yml +18 -19
  475. data/data/problems/4.yml +2 -2
  476. data/data/problems/40.yml +2 -2
  477. data/data/problems/400.yml +10 -9
  478. data/data/problems/401.yml +6 -7
  479. data/data/problems/402.yml +7 -9
  480. data/data/problems/403.yml +9 -10
  481. data/data/problems/404.yml +8 -10
  482. data/data/problems/405.yml +10 -10
  483. data/data/problems/406.yml +24 -30
  484. data/data/problems/407.yml +6 -10
  485. data/data/problems/408.yml +10 -10
  486. data/data/problems/409.yml +12 -7
  487. data/data/problems/41.yml +1 -1
  488. data/data/problems/410.yml +5 -6
  489. data/data/problems/411.yml +10 -13
  490. data/data/problems/412.yml +10 -10
  491. data/data/problems/413.yml +6 -7
  492. data/data/problems/414.yml +26 -28
  493. data/data/problems/415.yml +12 -13
  494. data/data/problems/416.yml +4 -4
  495. data/data/problems/417.yml +12 -14
  496. data/data/problems/418.yml +13 -10
  497. data/data/problems/419.yml +11 -13
  498. data/data/problems/42.yml +2 -2
  499. data/data/problems/420.yml +8 -8
  500. data/data/problems/421.yml +8 -13
  501. data/data/problems/422.yml +8 -8
  502. data/data/problems/423.yml +11 -12
  503. data/data/problems/424.yml +10 -10
  504. data/data/problems/425.yml +7 -7
  505. data/data/problems/426.yml +9 -9
  506. data/data/problems/427.yml +12 -13
  507. data/data/problems/428.yml +17 -20
  508. data/data/problems/429.yml +5 -5
  509. data/data/problems/43.yml +1 -1
  510. data/data/problems/430.yml +6 -7
  511. data/data/problems/44.yml +4 -4
  512. data/data/problems/45.yml +4 -4
  513. data/data/problems/46.yml +6 -9
  514. data/data/problems/47.yml +5 -8
  515. data/data/problems/48.yml +1 -1
  516. data/data/problems/49.yml +1 -1
  517. data/data/problems/5.yml +1 -1
  518. data/data/problems/50.yml +1 -1
  519. data/data/problems/51.yml +1 -3
  520. data/data/problems/52.yml +1 -1
  521. data/data/problems/53.yml +6 -12
  522. data/data/problems/54.yml +17 -16
  523. data/data/problems/55.yml +3 -3
  524. data/data/problems/56.yml +2 -2
  525. data/data/problems/57.yml +9 -10
  526. data/data/problems/58.yml +11 -11
  527. data/data/problems/59.yml +2 -2
  528. data/data/problems/6.yml +2 -2
  529. data/data/problems/60.yml +1 -1
  530. data/data/problems/61.yml +7 -7
  531. data/data/problems/62.yml +1 -1
  532. data/data/problems/63.yml +1 -1
  533. data/data/problems/64.yml +30 -44
  534. data/data/problems/65.yml +19 -19
  535. data/data/problems/66.yml +9 -12
  536. data/data/problems/67.yml +9 -9
  537. data/data/problems/68.yml +3 -3
  538. data/data/problems/69.yml +3 -3
  539. data/data/problems/7.yml +1 -1
  540. data/data/problems/70.yml +4 -4
  541. data/data/problems/71.yml +4 -4
  542. data/data/problems/72.yml +4 -4
  543. data/data/problems/73.yml +4 -4
  544. data/data/problems/74.yml +9 -16
  545. data/data/problems/75.yml +3 -3
  546. data/data/problems/76.yml +1 -1
  547. data/data/problems/77.yml +1 -1
  548. data/data/problems/78.yml +8 -8
  549. data/data/problems/79.yml +2 -2
  550. data/data/problems/8.yml +12 -13
  551. data/data/problems/80.yml +1 -1
  552. data/data/problems/81.yml +8 -10
  553. data/data/problems/82.yml +10 -11
  554. data/data/problems/83.yml +10 -11
  555. data/data/problems/84.yml +45 -37
  556. data/data/problems/85.yml +2 -2
  557. data/data/problems/86.yml +8 -8
  558. data/data/problems/87.yml +1 -1
  559. data/data/problems/88.yml +11 -22
  560. data/data/problems/89.yml +14 -14
  561. data/data/problems/9.yml +6 -7
  562. data/data/problems/90.yml +7 -7
  563. data/data/problems/91.yml +6 -8
  564. data/data/problems/92.yml +6 -11
  565. data/data/problems/93.yml +11 -12
  566. data/data/problems/94.yml +1 -1
  567. data/data/problems/95.yml +2 -2
  568. data/data/problems/96.yml +7 -9
  569. data/data/problems/97.yml +3 -3
  570. data/data/problems/98.yml +2 -2
  571. data/data/problems/99.yml +4 -4
  572. data/euler-manager.gemspec +2 -2
  573. data/example/1/README.md +1 -1
  574. data/example/1/ruby/1.rb +7 -1
  575. data/example/1/scala/1.scala +1 -1
  576. data/example/15/README.md +4 -4
  577. data/example/2/README.md +1 -4
  578. data/languages/c.rb +22 -0
  579. data/languages/elixir.rb +25 -0
  580. data/languages/java.rb +3 -2
  581. data/languages/perl.rb +25 -0
  582. data/languages/php.rb +25 -0
  583. data/lib/euler/version.rb +1 -1
  584. data/rake/clean.rake +0 -2
  585. data/rake/sha_answers.rake +20 -0
  586. data/rake/update.rake +5 -2
  587. data/spec/euler_spec.rb +5 -0
  588. data/templates/c.c +11 -0
  589. data/templates/elixir.ex +1 -0
  590. data/templates/perl.pl +3 -0
  591. data/templates/php.php +5 -0
  592. metadata +148 -164
  593. data/data/images/blackdot.gif +0 -0
  594. data/data/images/bracket_left.gif +0 -0
  595. data/data/images/bracket_right.gif +0 -0
  596. data/data/images/sod_13.gif +0 -119
  597. data/data/images/symbol_asymp.gif +0 -0
  598. data/data/images/symbol_cong.gif +0 -0
  599. data/data/images/symbol_ge.gif +0 -0
  600. data/data/images/symbol_gt.gif +0 -0
  601. data/data/images/symbol_implies.gif +0 -0
  602. data/data/images/symbol_lceil.gif +0 -0
  603. data/data/images/symbol_le.gif +0 -0
  604. data/data/images/symbol_lfloor.gif +0 -0
  605. data/data/images/symbol_lt.gif +0 -0
  606. data/data/images/symbol_maps.gif +0 -0
  607. data/data/images/symbol_minus.gif +0 -0
  608. data/data/images/symbol_ne.gif +0 -0
  609. data/data/images/symbol_plusmn.gif +0 -0
  610. data/data/images/symbol_radic.gif +0 -0
  611. data/data/images/symbol_rceil.gif +0 -0
  612. data/data/images/symbol_rfloor.gif +0 -0
  613. data/data/images/symbol_sum.gif +0 -0
  614. data/data/images/symbol_times.gif +0 -0
  615. data/example/1/haskell/1.hs +0 -3
  616. data/example/12/README.md +0 -20
  617. data/example/12/haskell/12.hs +0 -3
  618. data/example/lib/Euler.hs +0 -1
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  :id: 144
3
3
  :name: Investigating multiple reflections of a laser beam
4
- :url: http://projecteuler.net/problem=144
4
+ :url: https://projecteuler.net/problem=144
5
5
  :content: |+
6
6
  In laser physics, a "white cell" is a mirror system that acts as a delay line for the laser beam. The beam enters the cell, bounces around on the mirrors, and eventually works its way back out.
7
7
 
8
8
  The specific white cell we will be considering is an ellipse with the equation 4_x_<sup>2</sup> + _y_<sup>2</sup> = 100
9
9
 
10
- The section corresponding to ![]({{ images_dir }}/symbol_minus.gif)0.01 ![]({{ images_dir }}/symbol_le.gif) _x_ ![]({{ images_dir }}/symbol_le.gif) +0.01 at the top is missing, allowing the light to enter and exit through the hole.
10
+ The section corresponding to −0.01 ≤ _x_ ≤ +0.01 at the top is missing, allowing the light to enter and exit through the hole.
11
11
 
12
- ![]({{ images_dir }}/p_144_1.gif) ![]({{ images_dir }}/p_144_2.gif)
12
+ ![]({{ images_dir }}/p144_1.gif) ![]({{ images_dir }}/p144_2.gif)
13
13
 
14
14
  The light beam in this problem starts at the point (0.0,10.1) just outside the white cell, and the beam first impacts the mirror at (1.4,-9.6).
15
15
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  In the figure on the left, the red line shows the first two points of contact between the laser beam and the wall of the white cell; the blue line shows the line tangent to the ellipse at the point of incidence of the first bounce.
19
19
 
20
- The slope _m_ of the tangent line at any point (_x_,_y_) of the given ellipse is: _m_ = ![]({{ images_dir }}/symbol_minus.gif)4_x_/_y_
20
+ The slope _m_ of the tangent line at any point (_x_,_y_) of the given ellipse is: _m_ = −4_x_/_y_
21
21
 
22
22
  The normal line is perpendicular to this tangent line at the point of incidence.
23
23
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 145
3
3
  :name: How many reversible numbers are there below one-billion?
4
- :url: http://projecteuler.net/problem=145
4
+ :url: https://projecteuler.net/problem=145
5
5
  :content: |+
6
6
  Some positive integers _n_ have the property that the sum [_n_ + reverse(_n_)] consists entirely of odd (decimal) digits. For instance, 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers _reversible_; so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either _n_ or reverse(_n_).
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 146
3
3
  :name: Investigating a Prime Pattern
4
- :url: http://projecteuler.net/problem=146
4
+ :url: https://projecteuler.net/problem=146
5
5
  :content: |+
6
6
  The smallest positive integer _n_ for which the numbers _n_<sup>2</sup>+1, _n_<sup>2</sup>+3, _n_<sup>2</sup>+7, _n_<sup>2</sup>+9, _n_<sup>2</sup>+13, and _n_<sup>2</sup>+27 are consecutive primes is 10. The sum of all such integers _n_ below one-million is 1242490.
7
7
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  :id: 147
3
3
  :name: Rectangles in cross-hatched grids
4
- :url: http://projecteuler.net/problem=147
4
+ :url: https://projecteuler.net/problem=147
5
5
  :content: "In a 3x2 cross-hatched grid, a total of 37 different rectangles could be
6
- situated within that grid as indicated in the sketch.\n\n ![]({{ images_dir }}/p_147.gif)\n\nThere
6
+ situated within that grid as indicated in the sketch.\n\n ![]({{ images_dir }}/p147.gif)\n\nThere
7
7
  are 5 grids smaller than 3x2, vertical and horizontal dimensions being important,
8
8
  i.e. 1x1, 2x1, 3x1, 1x2 and 2x2. If each of them is cross-hatched, the following
9
9
  number of different rectangles could be situated within those smaller grids:\n\n1x1:
10
- 1\r \n2x1: 4\r \n3x1: 8\r \n1x2: 4\r \n2x2: 18\n\nAdding those to the 37 of
11
- the 3x2 grid, a total of 72 different rectangles could be situated within 3x2 and
12
- smaller grids.\n\nHow many different rectangles could be situated within 47x43 and
13
- smaller grids?\n\n"
10
+ 1 \n2x1: 4 \n3x1: 8 \n1x2: 4 \n2x2: 18\n\nAdding those to the 37 of the 3x2
11
+ grid, a total of 72 different rectangles could be situated within 3x2 and smaller
12
+ grids.\n\nHow many different rectangles could be situated within 47x43 and smaller
13
+ grids?\n\n"
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  :id: 148
3
3
  :name: Exploring Pascal's triangle
4
- :url: http://projecteuler.net/problem=148
4
+ :url: https://projecteuler.net/problem=148
5
5
  :content: |+
6
6
  We can easily verify that none of the entries in the first seven rows of Pascal's triangle are divisible by 7:
7
7
 
8
- |   |   |   |   |   |   |  1 |
9
- |   |   |   |   |   |  1 |   |  1 |
10
- |   |   |   |   |  1 |   |  2 |   |  1 |
11
- |   |   |   |  1 |   |  3 |   |  3 |   |  1 |
12
- |   |   |  1 |   |  4 |   |  6 |   |  4 |   |  1 |
13
- |   |  1 |   |  5 |   | 10 |   | 10 |   |  5 |   |  1 |
14
- | 1 |   |  6 |   | 15 |   | 20 |   | 15 |   |  6 |   |  1 |
8
+ | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp;1 |
9
+ | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp;1 | &nbsp; | &nbsp;1 |
10
+ | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp;1 | &nbsp; | &nbsp;2 | &nbsp; | &nbsp;1 |
11
+ | &nbsp; | &nbsp; | &nbsp; | &nbsp;1 | &nbsp; | &nbsp;3 | &nbsp; | &nbsp;3 | &nbsp; | &nbsp;1 |
12
+ | &nbsp; | &nbsp; | &nbsp;1 | &nbsp; | &nbsp;4 | &nbsp; | &nbsp;6 | &nbsp; | &nbsp;4 | &nbsp; | &nbsp;1 |
13
+ | &nbsp; | &nbsp;1 | &nbsp; | &nbsp;5 | &nbsp; | 10 | &nbsp; | 10 | &nbsp; | &nbsp;5 | &nbsp; | &nbsp;1 |
14
+ | 1 | &nbsp; | &nbsp;6 | &nbsp; | 15 | &nbsp; | 20 | &nbsp; | 15 | &nbsp; | &nbsp;6 | &nbsp; | &nbsp;1 |
15
15
 
16
16
  However, if we check the first one hundred rows, we will find that only 2361 of the 5050 entries are _not_ divisible by 7.
17
17
 
@@ -1,30 +1,17 @@
1
1
  ---
2
2
  :id: 149
3
3
  :name: Searching for a maximum-sum subsequence
4
- :url: http://projecteuler.net/problem=149
4
+ :url: https://projecteuler.net/problem=149
5
5
  :content: "Looking at the table below, it is easy to verify that the maximum possible
6
6
  sum of adjacent numbers in any direction (horizontal, vertical, diagonal or anti-diagonal)
7
- is 16 (= 8 + 7 + 1).\n\n<tbody align=\"right\">\n<tr>\n<td>\n<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
8
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2</td>\n<td>5</td>\n<td>3</td>\n<td>2</td>\n</tr>\r\n<tr>\n<td>9</td>\n<td>\n<img
9
- src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
10
- border=\"0\" style=\"vertical-align:middle;\">6</td>\n<td>5</td>\n<td>1</td>\n</tr>\r\n<tr>\n<td>3</td>\n<td>2</td>\n<td>7</td>\n<td>3</td>\n</tr>\r\n<tr>\n<td>\n<img
11
- src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
12
- border=\"0\" style=\"vertical-align:middle;\">1</td>\n<td>8</td>\n<td>\n<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
13
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">4</td>\n<td> 
14
- 8</td>\n</tr>\n</tbody>\n\nNow, let us repeat the search, but on a much larger scale:\n\nFirst,
15
- generate four million pseudo-random numbers using a specific form of what is known
16
- as a \"Lagged Fibonacci Generator\":\n\nFor 1 ![≤]({{ images_dir }}/symbol_le.gif)
17
- _k_ ![≤]({{ images_dir }}/symbol_le.gif) 55, _s_<sub><i>k</i></sub> = [100003 ![−]({{
18
- images_dir }}/symbol_minus.gif) 200003_k_ + 300007_k_<sup>3</sup>] (modulo 1000000)
19
- ![−]({{ images_dir }}/symbol_minus.gif) 500000. \n\rFor 56 ![≤]({{ images_dir }}/symbol_le.gif)
20
- _k_ ![≤]({{ images_dir }}/symbol_le.gif) 4000000, _s_<sub><i>k</i></sub> = [_s_<sub><i>k<img
21
- src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
22
- border=\"0\" style=\"vertical-align:middle;\">24</i></sub> + _s_<sub><i>k<img src=\"%7B%7B%20images_dir%20%7D%7D/symbol_minus.gif\"
23
- width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">55</i></sub>
24
- + 1000000] (modulo 1000000) ![−]({{ images_dir }}/symbol_minus.gif) 500000.\n\nThus,
25
- _s_<sub>10</sub> = ![−]({{ images_dir }}/symbol_minus.gif)393027 and _s_<sub>100</sub>
26
- = 86613.\n\nThe terms of _s_ are then arranged in a 2000 ![×]({{ images_dir }}/symbol_times.gif)2000
27
- table, using the first 2000 numbers to fill the first row (sequentially), the next
28
- 2000 numbers to fill the second row, and so on.\n\nFinally, find the greatest sum
29
- of (any number of) adjacent entries in any direction (horizontal, vertical, diagonal
30
- or anti-diagonal).\n\n"
7
+ is 16 (= 8 + 7 + 1).\n\n| −2 | 5 | 3 | 2 |\n| 9 | −6 | 5 | 1 |\n| 3 | 2 | 7 | 3
8
+ |\n| −1 | 8 | −4 | &nbsp; 8 |\n\nNow, let us repeat the search, but on a much larger
9
+ scale:\n\nFirst, generate four million pseudo-random numbers using a specific form
10
+ of what is known as a \"Lagged Fibonacci Generator\":\n\nFor 1 ≤ _k_ ≤ 55, _s_<sub><i>k</i></sub>
11
+ = [100003 − 200003_k_ + 300007_k_<sup>3</sup>] (modulo 1000000) − 500000. \nFor
12
+ 56 ≤ _k_ ≤ 4000000, _s_<sub><i>k</i></sub> = [_s_<sub><i>k−24</i></sub> + _s_<sub><i>k−55</i></sub>
13
+ + 1000000] (modulo 1000000) − 500000.\n\nThus, _s_<sub>10</sub> = −393027 and _s_<sub>100</sub>
14
+ = 86613.\n\nThe terms of _s_ are then arranged in a 2000×2000 table, using the first
15
+ 2000 numbers to fill the first row (sequentially), the next 2000 numbers to fill
16
+ the second row, and so on.\n\nFinally, find the greatest sum of (any number of)
17
+ adjacent entries in any direction (horizontal, vertical, diagonal or anti-diagonal).\n\n"
data/data/problems/15.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  :id: 15
3
3
  :name: Lattice paths
4
- :url: http://projecteuler.net/problem=15
4
+ :url: https://projecteuler.net/problem=15
5
5
  :content: |+
6
- Starting in the top left corner of a 2 ![×]({{ images_dir }}/symbol_times.gif)2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
6
+ Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
7
7
 
8
- ![]({{ images_dir }}/p_015.gif)
8
+ ![]({{ images_dir }}/p015.gif)
9
9
 
10
- How many such routes are there through a 20 ![×]({{ images_dir }}/symbol_times.gif)20 grid?
10
+ How many such routes are there through a 20×20 grid?
11
11
 
@@ -1,23 +1,22 @@
1
1
  ---
2
2
  :id: 150
3
3
  :name: Searching a triangular array for a sub-triangle having minimum-sum
4
- :url: http://projecteuler.net/problem=150
4
+ :url: https://projecteuler.net/problem=150
5
5
  :content: "In a triangular array of positive and negative integers, we wish to find
6
6
  a sub-triangle such that the sum of the numbers it contains is the smallest possible.\n\nIn
7
7
  the example below, it can be easily verified that the marked triangle satisfies
8
- this condition having a sum of ![]({{ images_dir }}/symbol_minus.gif)42.\n\n ![]({{
9
- images_dir }}/p_150.gif)\n\nWe wish to make such a triangular array with one thousand
10
- rows, so we generate 500500 pseudo-random numbers s<sub>k</sub> in the range ![±]({{
11
- images_dir }}/symbol_plusmn.gif)2<sup>19</sup>, using a type of random number generator
12
- (known as a Linear Congruential Generator) as follows:\n\nt := 0\r \n\rfor k =
13
- 1 up to k = 500500:\r \n\r    t := (615949\\*t + 797807) modulo 2<sup>20</sup>
14
- \ \n\r    s<sub>k</sub> := t ![]({{ images_dir }}/symbol_minus.gif)2<sup>19</sup>\n\nThus:
15
- s<sub>1</sub> = 273519, s<sub>2</sub> = ![−]({{ images_dir }}/symbol_minus.gif)153582,
16
- s<sub>3</sub> = 450905 etc\n\nOur triangular array is then formed using the pseudo-random
17
- numbers thus:\n\n\rs<sub>1</sub> \n\rs<sub>2</subs<sub>3</sub> \n\rs<sub>4</sub> 
18
- s<sub>5</sub>  s<sub>6</sub>  \r \n\rs<sub>7</sub>  s<sub>8</sub>  s<sub>9</sub> 
19
- s<sub>10</sub> \n\r...\r\n\nSub-triangles can start at any element of the array
20
- and extend down as far as we like (taking-in the two elements directly below it
21
- from the next row, the three elements directly below from the row after that, and
22
- so on).\r \n\rThe \"sum of a sub-triangle\" is defined as the sum of all the elements
23
- it contains.\r \n\rFind the smallest possible sub-triangle sum.\n\n"
8
+ this condition having a sum of −42.\n\n ![]({{ images_dir }}/p150.gif)\n\nWe wish
9
+ to make such a triangular array with one thousand rows, so we generate 500500 pseudo-random
10
+ numbers s<sub>k</sub> in the range ±2<sup>19</sup>, using a type of random number
11
+ generator (known as a Linear Congruential Generator) as follows:\n\nt := 0 \nfor
12
+ k = 1 up to k = 500500: \n&nbsp; &nbsp; t := (615949\\*t + 797807) modulo 2<sup>20</sup>
13
+ \ \n&nbsp; &nbsp; s<sub>k</sub> := t2<sup>19</sup>\n\nThus: s<sub>1</sub> = 273519,
14
+ s<sub>2</sub> =153582, s<sub>3</sub> = 450905 etc\n\nOur triangular array is then
15
+ formed using the pseudo-random numbers thus:\n\ns<sub>1</sub> \ns<sub>2</sub>&nbsp;
16
+ s<sub>3</sub> \ns<sub>4</sub>&nbsp; s<sub>5</sub>&nbsp; s<sub>6</sub>&nbsp; \ns<sub>7</sub>&nbsp;
17
+ s<sub>8</sub>&nbsp; s<sub>9</sub>&nbsp; s<sub>10</sub> \n...\n\nSub-triangles can
18
+ start at any element of the array and extend down as far as we like (taking-in the
19
+ two elements directly below it from the next row, the three elements directly below
20
+ from the row after that, and so on). \nThe \"sum of a sub-triangle\" is defined
21
+ as the sum of all the elements it contains. \nFind the smallest possible sub-triangle
22
+ sum.\n\n"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  :id: 151
3
3
  :name: 'Paper sheets of standard sizes: an expected-value problem'
4
- :url: http://projecteuler.net/problem=151
4
+ :url: https://projecteuler.net/problem=151
5
5
  :content: |+
6
6
  A printing shop runs 16 batches (jobs) every week and each batch requires a sheet of special colour-proofing paper of size A5.
7
7
 
@@ -11,11 +11,11 @@
11
11
 
12
12
  All the unused sheets are placed back in the envelope.
13
13
 
14
- ![]({{ images_dir }}/p_151.gif)
14
+ ![]({{ images_dir }}/p151.gif)
15
15
 
16
16
  At the beginning of each subsequent batch, he takes from the envelope one sheet of paper at random. If it is of size A5, he uses it. If it is larger, he repeats the 'cut-in-half' procedure until he has what he needs and any remaining sheets are always placed back in the envelope.
17
17
 
18
18
  Excluding the first and last batch of the week, find the expected number of times (during each week) that the foreman finds a single sheet of paper in the envelope.
19
19
 
20
- Give your answer rounded to six decimal places using the format x.xxxxxx .
20
+ Give your answer rounded to six decimal places using the format x.xxxxxx&nbsp;.
21
21
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  :id: 152
3
3
  :name: Writing 1/2 as a sum of inverse squares
4
- :url: http://projecteuler.net/problem=152
4
+ :url: https://projecteuler.net/problem=152
5
5
  :content: |+
6
6
  There are several ways to write the number 1/2 as a sum of inverse squares using _distinct_ integers.
7
7
 
8
8
  For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:
9
9
 
10
- ![]({{ images_dir }}/p_152_sum.gif)
10
+ ![]({{ images_dir }}/p152_sum.gif)
11
11
 
12
12
  In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}.
13
13
 
@@ -1,40 +1,35 @@
1
1
  ---
2
2
  :id: 153
3
3
  :name: Investigating Gaussian Integers
4
- :url: http://projecteuler.net/problem=153
4
+ :url: https://projecteuler.net/problem=153
5
5
  :content: "As we all know the equation <var>x</var><sup>2</sup>=-1 has no solutions
6
- for real <var>x</var>.\r \n\rIf we however introduce the imaginary number <var>i</var>
7
- this equation has two solutions: <var>x=i</var> and <var>x=-i</var>.\r \n\rIf we
8
- go a step further the equation (<var>x</var>-3)<sup>2</sup>=-4 has two complex solutions:
9
- <var>x</var>=3+2<var>i</var> and <var>x</var>=3-2<var>i</var>.\r \n<var>x</var>=3+2<var>i</var>
10
- and <var>x</var>=3-2<var>i</var> are called each others' complex conjugate.\r \n\rNumbers
11
- of the form <var>a</var>+<var>bi</var> are called complex numbers.\r \n\rIn general
12
- <var>a</var>+<var>bi</var> and <var>a</var> ![−]({{ images_dir }}/symbol_minus.gif)<var>bi</var>
13
- are each other's complex conjugate.\n\nA Gaussian Integer is a complex number <var>a</var>+<var>bi</var>
14
- such that both <var>a</var> and <var>b</var> are integers.\r \n\rThe regular integers
15
- are also Gaussian integers (with <var>b</var>=0).\r \n\rTo distinguish them from
16
- Gaussian integers with <var>b</var> ![]({{ images_dir }}/symbol_ne.gif) 0 we call
17
- such integers \"rational integers.\"\r \n\rA Gaussian integer is called a divisor
18
- of a rational integer <var>n</var> if the result is also a Gaussian integer.\r \n\rIf
19
- for example we divide 5 by 1+2<var>i</var> we can simplify ![]({{ images_dir }}/p_153_formule1.gif)
20
- in the following manner:\r \n\rMultiply numerator and denominator by the complex
21
- conjugate of 1+2<var>i</var>: 1 ![]({{ images_dir }}/symbol_minus.gif)2<var>i</var>.\r
22
- \ \n\rThe result is \r ![]({{ images_dir }}/p_153_formule2.gif).\r \n\rSo 1+2<var>i</var>
23
- is a divisor of 5.\r \n\rNote that 1+<var>i</var> is not a divisor of 5 because
24
- ![]({{ images_dir }}/p_153_formule5.gif).\r \n\rNote also that if the Gaussian
25
- Integer (<var>a</var>+<var>bi</var>) is a divisor of a rational integer <var>n</var>,
26
- then its complex conjugate (<var>a</var> ![−]({{ images_dir }}/symbol_minus.gif)<var>bi</var>)
6
+ for real <var>x</var>. \nIf we however introduce the imaginary number <var>i</var>
7
+ this equation has two solutions: <var>x=i</var> and <var>x=-i</var>. \nIf we go
8
+ a step further the equation (<var>x</var>-3)<sup>2</sup>=-4 has two complex solutions:
9
+ <var>x</var>=3+2<var>i</var> and <var>x</var>=3-2<var>i</var>. \n<var>x</var>=3+2<var>i</var>
10
+ and <var>x</var>=3-2<var>i</var> are called each others' complex conjugate. \nNumbers
11
+ of the form <var>a</var>+<var>bi</var> are called complex numbers. \nIn general
12
+ <var>a</var>+<var>bi</var> and <var>a</var>−<var>bi</var> are each other's complex
13
+ conjugate.\n\nA Gaussian Integer is a complex number <var>a</var>+<var>bi</var>
14
+ such that both <var>a</var> and <var>b</var> are integers. \nThe regular integers
15
+ are also Gaussian integers (with <var>b</var>=0). \nTo distinguish them from Gaussian
16
+ integers with <var>b</var> ≠ 0 we call such integers \"rational integers.\" \nA
17
+ Gaussian integer is called a divisor of a rational integer <var>n</var> if the result
18
+ is also a Gaussian integer. \nIf for example we divide 5 by 1+2<var>i</var> we
19
+ can simplify ![]({{ images_dir }}/p153_formule1.gif) in the following manner: \nMultiply
20
+ numerator and denominator by the complex conjugate of 1+2<var>i</var>: 1−2<var>i</var>.
21
+ \ \nThe result is ![]({{ images_dir }}/p153_formule2.gif). \nSo 1+2<var>i</var>
22
+ is a divisor of 5. \nNote that 1+<var>i</var> is not a divisor of 5 because ![]({{
23
+ images_dir }}/p153_formule5.gif). \nNote also that if the Gaussian Integer (<var>a</var>+<var>bi</var>)
24
+ is a divisor of a rational integer <var>n</var>, then its complex conjugate (<var>a</var>−<var>bi</var>)
27
25
  is also a divisor of <var>n</var>.\n\nIn fact, 5 has six divisors such that the
28
- real part is positive: {1, 1 + 2<var>i</var>, 1 ![]({{ images_dir }}/symbol_minus.gif)
29
- 2<var>i</var>, 2 + <var>i</var>, 2 ![−]({{ images_dir }}/symbol_minus.gif) <var>i</var>,
30
- 5}.\r \n\rThe following is a table of all of the divisors for the first five positive
31
- rational integers:\n\n| <var>n</var> | Gaussian integer divisors \n\rwith positive
32
- real part | Sum s(<var>n</var>) of \nthese\r\rdivisors |\n| 1 | 1 | 1 |\n| 2 |
33
- 1, 1+<var>i</var>, 1-<var>i</var>, 2 | 5 |\n| 3 | 1, 3 | 4 |\n| 4 | 1, 1+<var>i</var>,
34
- 1-<var>i</var>, 2, 2+2<var>i</var>, 2-2<var>i</var>,4 | 13 |\n| 5 | 1, 1+2<var>i</var>,
35
- 1-2<var>i</var>, 2+<var>i</var>, 2-<var>i</var>, 5 | 12 |\n\nFor divisors with positive
36
- real parts, then, we have: ![]({{ images_dir }}/p_153_formule6.gif).\n\nFor 1 ![]({{
37
- images_dir }}/symbol_le.gif) <var>n</var> ![]({{ images_dir }}/symbol_le.gif) 10<sup>5</sup>,
38
- ![∑]({{ images_dir }}/symbol_sum.gif) s(<var>n</var>)=17924657155.\n\nWhat is ![∑]({{
39
- images_dir }}/symbol_sum.gif) s(<var>n</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif)
40
- <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 10<sup>8</sup>?\n\n"
26
+ real part is positive: {1, 1 + 2<var>i</var>, 1 − 2<var>i</var>, 2 + <var>i</var>,
27
+ 2<var>i</var>, 5}. \nThe following is a table of all of the divisors for the
28
+ first five positive rational integers:\n\n| <var>n</var> | Gaussian integer divisors
29
+ \ \nwith positive real part | Sum s(<var>n</var>) of \nthese divisors |\n| 1 |
30
+ 1 | 1 |\n| 2 | 1, 1+<var>i</var>, 1-<var>i</var>, 2 | 5 |\n| 3 | 1, 3 | 4 |\n| 4
31
+ | 1, 1+<var>i</var>, 1-<var>i</var>, 2, 2+2<var>i</var>, 2-2<var>i</var>,4 | 13
32
+ |\n| 5 | 1, 1+2<var>i</var>, 1-2<var>i</var>, 2+<var>i</var>, 2-<var>i</var>, 5
33
+ | 12 |\n\nFor divisors with positive real parts, then, we have: ![]({{ images_dir
34
+ }}/p153_formule6.gif).\n\nFor 1 ≤ <var>n</var> ≤ 10<sup>5</sup>, ∑ s(<var>n</var>)=17924657155.\n\nWhat
35
+ is s(<var>n</var>) for 1 <var>n</var> 10<sup>8</sup>?\n\n"
@@ -1,15 +1,19 @@
1
1
  ---
2
2
  :id: 154
3
3
  :name: Exploring Pascal's pyramid
4
- :url: http://projecteuler.net/problem=154
5
- :content: "A triangular pyramid is constructed using spherical balls so that each
6
- ball rests on exactly three balls of the next lower level.\n\n ![]({{ images_dir
7
- }}/p_154_pyramid.gif)\n\nThen, we calculate the number of paths leading from the
8
- apex to each position:\n\nA path starts at the apex and progresses downwards to
9
- any of the three spheres directly below the current position.\n\nConsequently, the
10
- number of paths to reach a certain position is the sum of the numbers immediately
11
- above it (depending on the position, there are up to three numbers above it).\n\nThe
12
- result is _Pascal's pyramid_ and the numbers at each level <var>n</var> are the
13
- coefficients of the trinomial expansion \r(<var>x + y + z</var>)<sup><var>n</var></sup>.\n\nHow
14
- many coefficients in the expansion of (<var>x + y + z</var>)<sup>200000</sup> are
15
- multiples of 10<sup>12</sup>?\n\n"
4
+ :url: https://projecteuler.net/problem=154
5
+ :content: |+
6
+ A triangular pyramid is constructed using spherical balls so that each ball rests on exactly three balls of the next lower level.
7
+
8
+ ![]({{ images_dir }}/p154_pyramid.gif)
9
+
10
+ Then, we calculate the number of paths leading from the apex to each position:
11
+
12
+ A path starts at the apex and progresses downwards to any of the three spheres directly below the current position.
13
+
14
+ Consequently, the number of paths to reach a certain position is the sum of the numbers immediately above it (depending on the position, there are up to three numbers above it).
15
+
16
+ The result is _Pascal's pyramid_ and the numbers at each level <var>n</var> are the coefficients of the trinomial expansion (<var>x + y + z</var>)<sup><var>n</var></sup>.
17
+
18
+ How many coefficients in the expansion of (<var>x + y + z</var>)<sup>200000</sup> are multiples of 10<sup>12</sup>?
19
+
@@ -1,19 +1,20 @@
1
1
  ---
2
2
  :id: 155
3
3
  :name: Counting Capacitor Circuits
4
- :url: http://projecteuler.net/problem=155
4
+ :url: https://projecteuler.net/problem=155
5
5
  :content: "An electric circuit uses exclusively identical capacitors of the same value
6
- C.\r \n\rThe capacitors can be connected in series or in parallel to form sub-units,
6
+ C. \nThe capacitors can be connected in series or in parallel to form sub-units,
7
7
  which can then be connected in series or in parallel with other capacitors or other
8
8
  sub-units to form larger sub-units, and so on up to a final circuit.\n\nUsing this
9
9
  simple procedure and up to <var>n</var> identical capacitors, we can make circuits
10
10
  having a range of different total capacitances. For example, using up to <var>n</var>=3
11
- capacitors of 60 ![]({{ images_dir }}/p_155_capsmu.gif)F each, we can obtain the
12
- following 7 distinct total capacitance values:\n\n ![]({{ images_dir }}/p_155_capacitors1.gif)\n\nIf
11
+ capacitors of 60 ![]({{ images_dir }}/p155_capsmu.gif)F each, we can obtain the
12
+ following 7 distinct total capacitance values:\n\n ![]({{ images_dir }}/p155_capacitors1.gif)\n\nIf
13
13
  we denote by <var>D</var>(<var>n</var>) the number of distinct total capacitance
14
14
  values we can obtain when using up to <var>n</var> equal-valued capacitors and the
15
15
  simple procedure described above, we have: <var>D</var>(1)=1, <var>D</var>(2)=3,
16
16
  <var>D</var>(3)=7 ...\n\nFind <var>D</var>(18).\n\n_Reminder :_ When connecting
17
17
  capacitors C<sub>1</sub>, C<sub>2</sub> etc in parallel, the total capacitance is
18
- C<sub>T</sub> = C<sub>1</sub> + C<sub>2</sub> +...,\r \n\rwhereas when connecting
19
- them in series, the overall capacitance is given by:\r ![]({{ images_dir }}/p_155_capsform.gif)\n\n"
18
+ C<sub>T</sub>&nbsp;=&nbsp;C<sub>1</sub>&nbsp;+&nbsp;C<sub>2</sub>&nbsp;+..., \nwhereas
19
+ when connecting them in series, the overall capacitance is given by: ![]({{ images_dir
20
+ }}/p155_capsform.gif)\n\n"
@@ -1,24 +1,23 @@
1
1
  ---
2
2
  :id: 156
3
3
  :name: Counting Digits
4
- :url: http://projecteuler.net/problem=156
4
+ :url: https://projecteuler.net/problem=156
5
5
  :content: "Starting from zero the natural numbers are written down in base 10 like
6
- this:\r \n\r0 1 2 3 4 5 6 7 8 9 10 11 12....\n\nConsider the digit <var>d</var>=1.
6
+ this: \n0 1 2 3 4 5 6 7 8 9 10 11 12....\n\nConsider the digit <var>d</var>=1.
7
7
  After we write down each number <var>n</var>, we will update the number of ones
8
8
  that have occurred and call this number <var>f</var>(<var>n</var>,1). The first
9
9
  values for <var>f</var>(<var>n</var>,1), then, are as follows:\n\n| <var>n</var>
10
10
  | <var>f</var>(<var>n</var>,1) |\n| 0 | 0 |\n| 1 | 1 |\n| 2 | 1 |\n| 3 | 1 |\n|
11
11
  4 | 1 |\n| 5 | 1 |\n| 6 | 1 |\n| 7 | 1 |\n| 8 | 1 |\n| 9 | 1 |\n| 10 | 2 |\n| 11
12
- | 4 |\n| 12 | 5 |\n\nNote that <var>f</var>(<var>n</var>,1) never equals 3.\r \n\rSo
12
+ | 4 |\n| 12 | 5 |\n\nNote that <var>f</var>(<var>n</var>,1) never equals 3. \nSo
13
13
  the first two solutions of the equation <var>f</var>(<var>n</var>,1)=<var>n</var>
14
14
  are <var>n</var>=0 and <var>n</var>=1. The next solution is <var>n</var>=199981.\n\nIn
15
15
  the same manner the function <var>f</var>(<var>n,d</var>) gives the total number
16
16
  of digits <var>d</var> that have been written down after the number <var>n</var>
17
- has been written.\r \n\rIn fact, for every digit <var>d</var> ![]({{ images_dir
18
- }}/symbol_ne.gif) 0, 0 is the first solution of the equation <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\nLet
19
- <var>s</var>(<var>d</var>) be the sum of all the solutions for which <var>f</var>(<var>n,d</var>)=<var>n</var>.\r
20
- \ \n\rYou are given that <var>s</var>(1)=22786974071.\n\nFind ![]({{ images_dir
21
- }}/symbol_sum.gif) <var>s</var>(<var>d</var>) for 1 ![≤]({{ images_dir }}/symbol_le.gif)
22
- d ![≤]({{ images_dir }}/symbol_le.gif) 9.\n\nNote: if, for some <var>n</var>, <var>f</var>(<var>n,d</var>)=<var>n</var>\r
17
+ has been written. \nIn fact, for every digit <var>d</var> ≠ 0, 0 is the first solution
18
+ of the equation <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\nLet <var>s</var>(<var>d</var>)
19
+ be the sum of all the solutions for which <var>f</var>(<var>n,d</var>)=<var>n</var>.
20
+ \ \nYou are given that <var>s</var>(1)=22786974071.\n\nFind ∑ <var>s</var>(<var>d</var>)
21
+ for 1 ≤ d ≤ 9.\n\nNote: if, for some <var>n</var>, <var>f</var>(<var>n,d</var>)=<var>n</var>
23
22
  for more than one value of <var>d</var> this value of <var>n</var> is counted again
24
23
  for every value of <var>d</var> for which <var>f</var>(<var>n,d</var>)=<var>n</var>.\n\n"
@@ -2,12 +2,11 @@
2
2
  :id: 157
3
3
  :name: Solving the diophantine equation <sup>1</sup>/<sub><var>a</var></sub>+<sup>1</sup>/<sub><var>b</var></sub>=
4
4
  <sup><var>p</var></sup>/<sub>10<sup><var>n</var></sup></sub>
5
- :url: http://projecteuler.net/problem=157
5
+ :url: https://projecteuler.net/problem=157
6
6
  :content: "Consider the diophantine equation <sup>1</sup>/<sub><var>a</var></sub>+<sup>1</sup>/<sub><var>b</var></sub>=
7
7
  <sup><var>p</var></sup>/<sub>10<sup><var>n</var></sup></sub> with <var>a, b, p,
8
- n</var> positive integers and <var>a</var> ![]({{ images_dir }}/symbol_le.gif)
9
- <var>b</var>. \n\rFor <var>n</var>=1 this equation has 20 solutions that are listed
10
- below:\n\n| <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>1</sub>=<sup>20</sup>/<sub>10</sub>
8
+ n</var> positive integers and <var>a</var> ≤ <var>b</var>. \nFor <var>n</var>=1
9
+ this equation has 20 solutions that are listed below:\n\n| <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>1</sub>=<sup>20</sup>/<sub>10</sub>
11
10
  | <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>2</sub>=<sup>15</sup>/<sub>10</sub>
12
11
  | <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>5</sub>=<sup>12</sup>/<sub>10</sub>
13
12
  | <sup>1</sup>/<sub>1</sub>+<sup>1</sup>/<sub>10</sub>=<sup>11</sup>/<sub>10</sub>
@@ -27,5 +26,4 @@
27
26
  | <sup>1</sup>/<sub>14</sub>+<sup>1</sup>/<sub>35</sub>=<sup>1</sup>/<sub>10</sub>
28
27
  | <sup>1</sup>/<sub>15</sub>+<sup>1</sup>/<sub>30</sub>=<sup>1</sup>/<sub>10</sub>
29
28
  | <sup>1</sup>/<sub>20</sub>+<sup>1</sup>/<sub>20</sub>=<sup>1</sup>/<sub>10</sub>
30
- |\n\nHow many solutions has this equation for 1 ![]({{ images_dir }}/symbol_le.gif)
31
- <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 9?\n\n"
29
+ |\n\nHow many solutions has this equation for 1 ≤ <var>n</var> ≤ 9?\n\n"
@@ -2,16 +2,16 @@
2
2
  :id: 158
3
3
  :name: Exploring strings for which only one character comes lexicographically after
4
4
  its neighbour to the left
5
- :url: http://projecteuler.net/problem=158
5
+ :url: https://projecteuler.net/problem=158
6
6
  :content: "Taking three different letters from the 26 letters of the alphabet, character
7
- strings of length three can be formed. \n\rExamples are 'abc', 'hat' and 'zyx'.
8
- \ \n\rWhen we study these three examples we see that for 'abc' two characters come
9
- lexicographically after its neighbour to the left. \n \rFor 'hat' there is exactly
10
- one character that comes lexicographically after its neighbour to the left. For
11
- 'zyx' there are zero characters that come lexicographically after its neighbour
12
- to the left. \n\rIn all there are 10400 strings of length 3 for which exactly one
13
- character comes lexicographically after its neighbour to the left.\n\nWe now consider
14
- strings of <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif) 26 different characters
15
- from the alphabet. \n \rFor every <var>n</var>, p(<var>n</var>) is the number of
16
- strings of length <var>n</var> for which exactly one character comes lexicographically
17
- after its neighbour to the left.\n\nWhat is the maximum value of p(<var>n</var>)?\n\n"
7
+ strings of length three can be formed. \nExamples are 'abc', 'hat' and 'zyx'. \nWhen
8
+ we study these three examples we see that for 'abc' two characters come lexicographically
9
+ after its neighbour to the left. \n For 'hat' there is exactly one character that
10
+ comes lexicographically after its neighbour to the left. For 'zyx' there are zero
11
+ characters that come lexicographically after its neighbour to the left. \nIn all
12
+ there are 10400 strings of length 3 for which exactly one character comes lexicographically
13
+ after its neighbour to the left.\n\nWe now consider strings of <var>n</var> ≤ 26
14
+ different characters from the alphabet. \n For every <var>n</var>, p(<var>n</var>)
15
+ is the number of strings of length <var>n</var> for which exactly one character
16
+ comes lexicographically after its neighbour to the left.\n\nWhat is the maximum
17
+ value of p(<var>n</var>)?\n\n"