euler-manager 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/data/images/sod_13.gif +4 -0
  4. data/data/problems/100.yml +1 -1
  5. data/data/problems/101.yml +16 -16
  6. data/data/problems/102.yml +2 -3
  7. data/data/problems/103.yml +16 -16
  8. data/data/problems/105.yml +2 -2
  9. data/data/problems/106.yml +2 -2
  10. data/data/problems/107.yml +15 -15
  11. data/data/problems/108.yml +13 -16
  12. data/data/problems/109.yml +16 -17
  13. data/data/problems/11.yml +22 -23
  14. data/data/problems/110.yml +9 -10
  15. data/data/problems/114.yml +30 -41
  16. data/data/problems/116.yml +19 -25
  17. data/data/problems/117.yml +24 -33
  18. data/data/problems/120.yml +3 -3
  19. data/data/problems/122.yml +18 -20
  20. data/data/problems/123.yml +2 -2
  21. data/data/problems/124.yml +18 -23
  22. data/data/problems/126.yml +10 -11
  23. data/data/problems/127.yml +7 -7
  24. data/data/problems/128.yml +1 -1
  25. data/data/problems/130.yml +6 -7
  26. data/data/problems/131.yml +1 -1
  27. data/data/problems/132.yml +1 -1
  28. data/data/problems/134.yml +2 -2
  29. data/data/problems/135.yml +2 -2
  30. data/data/problems/136.yml +2 -2
  31. data/data/problems/137.yml +4 -4
  32. data/data/problems/138.yml +4 -4
  33. data/data/problems/139.yml +1 -1
  34. data/data/problems/14.yml +12 -13
  35. data/data/problems/140.yml +3 -3
  36. data/data/problems/142.yml +1 -1
  37. data/data/problems/143.yml +2 -2
  38. data/data/problems/144.yml +3 -3
  39. data/data/problems/147.yml +1 -1
  40. data/data/problems/149.yml +11 -13
  41. data/data/problems/15.yml +3 -3
  42. data/data/problems/150.yml +8 -8
  43. data/data/problems/151.yml +1 -1
  44. data/data/problems/152.yml +1 -1
  45. data/data/problems/153.yml +24 -26
  46. data/data/problems/154.yml +10 -9
  47. data/data/problems/155.yml +3 -3
  48. data/data/problems/156.yml +7 -8
  49. data/data/problems/157.yml +3 -4
  50. data/data/problems/158.yml +4 -5
  51. data/data/problems/159.yml +3 -3
  52. data/data/problems/161.yml +5 -4
  53. data/data/problems/163.yml +10 -10
  54. data/data/problems/165.yml +1 -1
  55. data/data/problems/166.yml +7 -7
  56. data/data/problems/167.yml +3 -4
  57. data/data/problems/168.yml +5 -5
  58. data/data/problems/170.yml +2 -2
  59. data/data/problems/171.yml +3 -3
  60. data/data/problems/173.yml +1 -1
  61. data/data/problems/174.yml +3 -3
  62. data/data/problems/175.yml +4 -4
  63. data/data/problems/177.yml +1 -1
  64. data/data/problems/179.yml +1 -1
  65. data/data/problems/180.yml +8 -9
  66. data/data/problems/182.yml +22 -24
  67. data/data/problems/183.yml +14 -15
  68. data/data/problems/184.yml +2 -2
  69. data/data/problems/186.yml +10 -11
  70. data/data/problems/187.yml +6 -8
  71. data/data/problems/189.yml +10 -9
  72. data/data/problems/190.yml +1 -1
  73. data/data/problems/192.yml +11 -12
  74. data/data/problems/194.yml +8 -8
  75. data/data/problems/195.yml +2 -2
  76. data/data/problems/197.yml +5 -6
  77. data/data/problems/198.yml +11 -12
  78. data/data/problems/199.yml +7 -7
  79. data/data/problems/20.yml +8 -10
  80. data/data/problems/202.yml +1 -1
  81. data/data/problems/207.yml +4 -4
  82. data/data/problems/208.yml +4 -5
  83. data/data/problems/21.yml +5 -6
  84. data/data/problems/210.yml +4 -5
  85. data/data/problems/211.yml +1 -1
  86. data/data/problems/212.yml +22 -26
  87. data/data/problems/213.yml +5 -6
  88. data/data/problems/214.yml +8 -9
  89. data/data/problems/215.yml +4 -4
  90. data/data/problems/216.yml +5 -5
  91. data/data/problems/217.yml +8 -10
  92. data/data/problems/218.yml +1 -1
  93. data/data/problems/22.yml +1 -1
  94. data/data/problems/220.yml +15 -15
  95. data/data/problems/221.yml +4 -5
  96. data/data/problems/223.yml +5 -6
  97. data/data/problems/224.yml +5 -6
  98. data/data/problems/226.yml +8 -8
  99. data/data/problems/228.yml +4 -5
  100. data/data/problems/229.yml +16 -16
  101. data/data/problems/230.yml +4 -4
  102. data/data/problems/231.yml +4 -5
  103. data/data/problems/233.yml +1 -1
  104. data/data/problems/234.yml +9 -10
  105. data/data/problems/236.yml +4 -4
  106. data/data/problems/237.yml +3 -3
  107. data/data/problems/238.yml +3 -4
  108. data/data/problems/241.yml +4 -4
  109. data/data/problems/242.yml +2 -2
  110. data/data/problems/243.yml +12 -12
  111. data/data/problems/244.yml +10 -11
  112. data/data/problems/245.yml +14 -15
  113. data/data/problems/246.yml +10 -9
  114. data/data/problems/247.yml +12 -13
  115. data/data/problems/251.yml +3 -3
  116. data/data/problems/252.yml +6 -7
  117. data/data/problems/254.yml +2 -2
  118. data/data/problems/255.yml +35 -36
  119. data/data/problems/256.yml +16 -20
  120. data/data/problems/257.yml +9 -9
  121. data/data/problems/258.yml +5 -6
  122. data/data/problems/26.yml +1 -1
  123. data/data/problems/260.yml +6 -8
  124. data/data/problems/261.yml +6 -7
  125. data/data/problems/262.yml +1 -1
  126. data/data/problems/264.yml +10 -11
  127. data/data/problems/265.yml +1 -1
  128. data/data/problems/27.yml +10 -11
  129. data/data/problems/270.yml +3 -3
  130. data/data/problems/271.yml +5 -6
  131. data/data/problems/272.yml +6 -7
  132. data/data/problems/273.yml +3 -3
  133. data/data/problems/274.yml +15 -15
  134. data/data/problems/275.yml +3 -3
  135. data/data/problems/276.yml +3 -3
  136. data/data/problems/277.yml +3 -3
  137. data/data/problems/278.yml +15 -17
  138. data/data/problems/281.yml +4 -4
  139. data/data/problems/282.yml +2 -2
  140. data/data/problems/284.yml +7 -8
  141. data/data/problems/287.yml +18 -17
  142. data/data/problems/288.yml +1 -1
  143. data/data/problems/289.yml +1 -1
  144. data/data/problems/29.yml +12 -13
  145. data/data/problems/290.yml +1 -1
  146. data/data/problems/291.yml +3 -3
  147. data/data/problems/292.yml +1 -1
  148. data/data/problems/293.yml +7 -7
  149. data/data/problems/295.yml +8 -8
  150. data/data/problems/296.yml +4 -5
  151. data/data/problems/297.yml +4 -5
  152. data/data/problems/299.yml +11 -12
  153. data/data/problems/300.yml +10 -9
  154. data/data/problems/301.yml +2 -2
  155. data/data/problems/303.yml +3 -3
  156. data/data/problems/304.yml +6 -7
  157. data/data/problems/305.yml +3 -2
  158. data/data/problems/306.yml +8 -11
  159. data/data/problems/307.yml +2 -3
  160. data/data/problems/309.yml +8 -8
  161. data/data/problems/31.yml +1 -1
  162. data/data/problems/310.yml +6 -7
  163. data/data/problems/311.yml +11 -11
  164. data/data/problems/312.yml +5 -5
  165. data/data/problems/313.yml +4 -4
  166. data/data/problems/314.yml +4 -5
  167. data/data/problems/315.yml +26 -27
  168. data/data/problems/316.yml +2 -4
  169. data/data/problems/318.yml +27 -34
  170. data/data/problems/319.yml +11 -12
  171. data/data/problems/32.yml +1 -1
  172. data/data/problems/320.yml +1 -1
  173. data/data/problems/321.yml +3 -3
  174. data/data/problems/322.yml +4 -4
  175. data/data/problems/323.yml +7 -8
  176. data/data/problems/324.yml +8 -9
  177. data/data/problems/325.yml +1 -1
  178. data/data/problems/326.yml +2 -2
  179. data/data/problems/327.yml +27 -29
  180. data/data/problems/328.yml +2 -2
  181. data/data/problems/330.yml +13 -14
  182. data/data/problems/331.yml +12 -12
  183. data/data/problems/332.yml +10 -9
  184. data/data/problems/333.yml +15 -16
  185. data/data/problems/334.yml +14 -14
  186. data/data/problems/335.yml +2 -2
  187. data/data/problems/336.yml +5 -4
  188. data/data/problems/337.yml +7 -7
  189. data/data/problems/338.yml +21 -24
  190. data/data/problems/340.yml +6 -7
  191. data/data/problems/341.yml +3 -5
  192. data/data/problems/342.yml +6 -7
  193. data/data/problems/343.yml +8 -12
  194. data/data/problems/344.yml +1 -1
  195. data/data/problems/347.yml +8 -8
  196. data/data/problems/350.yml +5 -5
  197. data/data/problems/351.yml +1 -1
  198. data/data/problems/352.yml +25 -26
  199. data/data/problems/353.yml +1 -1
  200. data/data/problems/354.yml +6 -6
  201. data/data/problems/356.yml +2 -3
  202. data/data/problems/358.yml +13 -14
  203. data/data/problems/359.yml +1 -1
  204. data/data/problems/361.yml +2 -1
  205. data/data/problems/362.yml +11 -13
  206. data/data/problems/363.yml +6 -6
  207. data/data/problems/364.yml +3 -3
  208. data/data/problems/365.yml +2 -2
  209. data/data/problems/366.yml +4 -5
  210. data/data/problems/369.yml +1 -1
  211. data/data/problems/370.yml +3 -3
  212. data/data/problems/372.yml +6 -8
  213. data/data/problems/374.yml +5 -7
  214. data/data/problems/375.yml +5 -6
  215. data/data/problems/377.yml +2 -2
  216. data/data/problems/378.yml +2 -2
  217. data/data/problems/379.yml +7 -8
  218. data/data/problems/38.yml +9 -9
  219. data/data/problems/380.yml +12 -15
  220. data/data/problems/381.yml +8 -11
  221. data/data/problems/382.yml +6 -6
  222. data/data/problems/383.yml +4 -4
  223. data/data/problems/384.yml +7 -8
  224. data/data/problems/385.yml +8 -8
  225. data/data/problems/386.yml +2 -2
  226. data/data/problems/388.yml +5 -6
  227. data/data/problems/39.yml +1 -1
  228. data/data/problems/390.yml +4 -6
  229. data/data/problems/391.yml +11 -12
  230. data/data/problems/392.yml +1 -1
  231. data/data/problems/393.yml +2 -2
  232. data/data/problems/394.yml +6 -7
  233. data/data/problems/395.yml +5 -5
  234. data/data/problems/396.yml +15 -17
  235. data/data/problems/397.yml +5 -8
  236. data/data/problems/4.yml +1 -1
  237. data/data/problems/40.yml +1 -1
  238. data/data/problems/400.yml +5 -6
  239. data/data/problems/401.yml +2 -2
  240. data/data/problems/402.yml +7 -8
  241. data/data/problems/403.yml +9 -10
  242. data/data/problems/404.yml +5 -6
  243. data/data/problems/405.yml +7 -7
  244. data/data/problems/406.yml +8 -10
  245. data/data/problems/407.yml +9 -9
  246. data/data/problems/410.yml +5 -6
  247. data/data/problems/411.yml +11 -12
  248. data/data/problems/412.yml +9 -9
  249. data/data/problems/414.yml +13 -15
  250. data/data/problems/415.yml +2 -2
  251. data/data/problems/417.yml +4 -5
  252. data/data/problems/418.yml +7 -8
  253. data/data/problems/419.yml +8 -8
  254. data/data/problems/420.yml +5 -5
  255. data/data/problems/421.yml +11 -12
  256. data/data/problems/422.yml +9 -9
  257. data/data/problems/423.yml +5 -7
  258. data/data/problems/424.yml +8 -9
  259. data/data/problems/425.yml +2 -3
  260. data/data/problems/426.yml +3 -3
  261. data/data/problems/427.yml +8 -8
  262. data/data/problems/428.yml +16 -19
  263. data/data/problems/430.yml +4 -5
  264. data/data/problems/44.yml +3 -3
  265. data/data/problems/45.yml +2 -2
  266. data/data/problems/46.yml +8 -8
  267. data/data/problems/47.yml +6 -10
  268. data/data/problems/53.yml +8 -9
  269. data/data/problems/56.yml +1 -1
  270. data/data/problems/57.yml +5 -5
  271. data/data/problems/58.yml +1 -1
  272. data/data/problems/6.yml +1 -1
  273. data/data/problems/61.yml +4 -4
  274. data/data/problems/64.yml +39 -46
  275. data/data/problems/65.yml +13 -14
  276. data/data/problems/66.yml +10 -10
  277. data/data/problems/68.yml +4 -5
  278. data/data/problems/69.yml +2 -2
  279. data/data/problems/70.yml +3 -4
  280. data/data/problems/71.yml +3 -3
  281. data/data/problems/72.yml +3 -3
  282. data/data/problems/73.yml +3 -3
  283. data/data/problems/74.yml +15 -22
  284. data/data/problems/75.yml +1 -1
  285. data/data/problems/8.yml +14 -14
  286. data/data/problems/81.yml +7 -7
  287. data/data/problems/82.yml +4 -4
  288. data/data/problems/83.yml +4 -4
  289. data/data/problems/85.yml +1 -1
  290. data/data/problems/86.yml +8 -8
  291. data/data/problems/88.yml +22 -27
  292. data/data/problems/9.yml +6 -6
  293. data/data/problems/90.yml +13 -13
  294. data/data/problems/91.yml +8 -8
  295. data/data/problems/92.yml +7 -9
  296. data/data/problems/93.yml +9 -10
  297. data/data/problems/95.yml +1 -1
  298. data/data/problems/96.yml +17 -17
  299. data/data/problems/97.yml +2 -2
  300. data/data/problems/99.yml +2 -2
  301. data/lib/euler/problem.rb +6 -1
  302. data/lib/euler/version.rb +1 -1
  303. metadata +2 -2
@@ -7,14 +7,13 @@
7
7
  | 600863 | 701497 |\n| ... | ... | ... |\n\nThe telephone number of the caller and
8
8
  the called number in record n are Caller(n) = S<sub>2n-1</sub> and Called(n) = S<sub>2n</sub>
9
9
  where S<sub>1,2,3,...</sub> come from the \"Lagged Fibonacci Generator\":\n\nFor
10
- 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) k ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
- 55, S<sub>k</sub> = [100003 - 200003k + 300007k<sup>3</sup>] (modulo 1000000) \n\rFor
12
- 56 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) k, S<sub>k</sub>
13
- = [S<sub>k-24</sub> + S<sub>k-55</sub>] (modulo 1000000)\n\nIf Caller(n) = Called(n)
14
- then the user is assumed to have misdialled and the call fails; otherwise the call
15
- is successful.\n\nFrom the start of the records, we say that any pair of users X
16
- and Y are friends if X calls Y or vice-versa. Similarly, X is a friend of a friend
17
- of Z if X is a friend of Y and Y is a friend of Z; and so on for longer chains.\n\nThe
18
- Prime Minister's phone number is 524287. After how many successful calls, not counting
19
- misdials, will 99% of the users (including the PM) be a friend, or a friend of a
20
- friend etc., of the Prime Minister?\n\n"
10
+ 1 ![≤]({{ images_dir }}/symbol_le.gif) k ![≤]({{ images_dir }}/symbol_le.gif) 55,
11
+ S<sub>k</sub> = [100003 - 200003k + 300007k<sup>3</sup>] (modulo 1000000) \n\rFor
12
+ 56 ![≤]({{ images_dir }}/symbol_le.gif) k, S<sub>k</sub> = [S<sub>k-24</sub> + S<sub>k-55</sub>]
13
+ (modulo 1000000)\n\nIf Caller(n) = Called(n) then the user is assumed to have misdialled
14
+ and the call fails; otherwise the call is successful.\n\nFrom the start of the records,
15
+ we say that any pair of users X and Y are friends if X calls Y or vice-versa. Similarly,
16
+ X is a friend of a friend of Z if X is a friend of Y and Y is a friend of Z; and
17
+ so on for longer chains.\n\nThe Prime Minister's phone number is 524287. After how
18
+ many successful calls, not counting misdials, will 99% of the users (including the
19
+ PM) be a friend, or a friend of a friend etc., of the Prime Minister?\n\n"
@@ -3,11 +3,9 @@
3
3
  :name: Semiprimes
4
4
  :url: http://projecteuler.net/problem=187
5
5
  :content: "A composite is a number containing at least two prime factors. For example,
6
- 15 = 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
7
- 5; 9 = 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
- 3; 12 = 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
9
- 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 3.\n\nThere
10
- are ten composites below thirty containing precisely two, not necessarily distinct,
11
- prime factors:\r4, 6, 9, 10, 14, 15, 21, 22, 25, 26.\n\nHow many composite integers,
12
- <var>n</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
13
- 10<sup>8</sup>, have precisely two, not necessarily distinct, prime factors?\n\n"
6
+ 15 = 3 ![×]({{ images_dir }}/symbol_times.gif) 5; 9 = 3 ![×]({{ images_dir }}/symbol_times.gif)
7
+ 3; 12 = 2 ![×]({{ images_dir }}/symbol_times.gif) 2 ![×]({{ images_dir }}/symbol_times.gif)
8
+ 3.\n\nThere are ten composites below thirty containing precisely two, not necessarily
9
+ distinct, prime factors:\r4, 6, 9, 10, 14, 15, 21, 22, 25, 26.\n\nHow many composite
10
+ integers, <var>n</var> ![<]({{ images_dir }}/symbol_lt.gif) 10<sup>8</sup>, have
11
+ precisely two, not necessarily distinct, prime factors?\n\n"
@@ -2,12 +2,13 @@
2
2
  :id: 189
3
3
  :name: Tri-colouring a triangular grid
4
4
  :url: http://projecteuler.net/problem=189
5
- :content: "Consider the following configuration of 64 triangles:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_189_grid.gif)\n\nWe
6
- wish to colour the interior of each triangle with one of three colours: red, green
7
- or blue, so that no two neighbouring triangles have the same colour. Such a colouring
8
- shall be called valid. Here, two triangles are said to be neighbouring if they share
9
- an edge. \n\rNote: if they only share a vertex, then they are not neighbours.\n\nFor
10
- example, here is a valid colouring of the above grid:\n\n ![](/home/will/src/euler-manager/config/../data/images/p_189_colours.gif)\n\nA
11
- colouring C' which is obtained from a colouring C by rotation or reflection is considered
12
- _distinct_ from C unless the two are identical.\n\nHow many distinct valid colourings
13
- are there for the above configuration?\n\n"
5
+ :content: "Consider the following configuration of 64 triangles:\n\n ![]({{ images_dir
6
+ }}/p_189_grid.gif)\n\nWe wish to colour the interior of each triangle with one of
7
+ three colours: red, green or blue, so that no two neighbouring triangles have the
8
+ same colour. Such a colouring shall be called valid. Here, two triangles are said
9
+ to be neighbouring if they share an edge. \n\rNote: if they only share a vertex,
10
+ then they are not neighbours.\n\nFor example, here is a valid colouring of the above
11
+ grid:\n\n ![]({{ images_dir }}/p_189_colours.gif)\n\nA colouring C' which is obtained
12
+ from a colouring C by rotation or reflection is considered _distinct_ from C unless
13
+ the two are identical.\n\nHow many distinct valid colourings are there for the above
14
+ configuration?\n\n"
@@ -7,5 +7,5 @@
7
7
 
8
8
  For example, it can be verified that [P<sub>10</sub>] = 4112 ([] is the integer part function).
9
9
 
10
- Find Σ[P<sub>m</sub>] for 2 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) m ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 15.
10
+ Find Σ[P<sub>m</sub>] for 2 ![≤]({{ images_dir }}/symbol_le.gif) m ![≤]({{ images_dir }}/symbol_le.gif) 15.
11
11
 
@@ -4,16 +4,15 @@
4
4
  :url: http://projecteuler.net/problem=192
5
5
  :content: "Let <var>x</var> be a real number. \n\rA _best approximation_ to <var>x</var>
6
6
  for the _denominator bound_ <var>d</var> is a rational number <var>r</var>/<var>s</var>
7
- _in reduced form_, with <var>s</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
- <var>d</var>, such that any rational number which is closer to <var>x</var> than
9
- <var>r</var>/<var>s</var> has a denominator larger than <var>d</var>:\n\n|<var>p</var>/<var>q</var>-<var>x</var>|
10
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) |<var>r</var>/<var>s</var>-<var>x</var>|
11
- ![⇒](/home/will/src/euler-manager/config/../data/images/symbol_implies.gif) <var>q</var>
12
- ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) <var>d</var>\n\nFor
13
- example, the best approximation to ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)13
14
- for the denominator bound 20 is 18/5 and the best approximation to ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)13
15
- for the denominator bound 30 is 101/28.\n\nFind the sum of all denominators of the
16
- best approximations to ![√](/home/will/src/euler-manager/config/../data/images/symbol_radic.gif)<var>n</var>
7
+ _in reduced form_, with <var>s</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>d</var>,
8
+ such that any rational number which is closer to <var>x</var> than <var>r</var>/<var>s</var>
9
+ has a denominator larger than <var>d</var>:\n\n|<var>p</var>/<var>q</var>-<var>x</var>|
10
+ ![<]({{ images_dir }}/symbol_lt.gif) |<var>r</var>/<var>s</var>-<var>x</var>| ![⇒]({{
11
+ images_dir }}/symbol_implies.gif) <var>q</var> ![>]({{ images_dir }}/symbol_gt.gif)
12
+ <var>d</var>\n\nFor example, the best approximation to ![√]({{ images_dir }}/symbol_radic.gif)13
13
+ for the denominator bound 20 is 18/5 and the best approximation to ![√]({{ images_dir
14
+ }}/symbol_radic.gif)13 for the denominator bound 30 is 101/28.\n\nFind the sum of
15
+ all denominators of the best approximations to ![√]({{ images_dir }}/symbol_radic.gif)<var>n</var>
17
16
  for the denominator bound 10<sup>12</sup>, where <var>n</var> is not a perfect square
18
- and 1 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>n</var>
19
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 100000.\n\n"
17
+ and 1 ![<]({{ images_dir }}/symbol_lt.gif) <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)
18
+ 100000.\n\n"
@@ -2,14 +2,14 @@
2
2
  :id: 194
3
3
  :name: Coloured Configurations
4
4
  :url: http://projecteuler.net/problem=194
5
- :content: "Consider graphs built with the units A: ![](/home/will/src/euler-manager/config/../data/images/p_194_GraphA.png)\rand
6
- B: ![](/home/will/src/euler-manager/config/../data/images/p_194_GraphB.png), where
7
- the units are glued along\rthe vertical edges as in the graph ![](/home/will/src/euler-manager/config/../data/images/p_194_Fig.png).\n\nA
8
- configuration of type (<var>a</var>,<var>b</var>,<var>c</var>) is a graph thus built
9
- of <var>a</var> units A and <var>b</var> units B, where the graph's vertices are
10
- coloured using up to <var>c</var> colours, so that no two adjacent vertices have
11
- the same colour. \n\rThe compound graph above is an example of a configuration
12
- of type (2,2,6), in fact of type (2,2,<var>c</var>) for all <var>c</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
5
+ :content: "Consider graphs built with the units A: ![]({{ images_dir }}/p_194_GraphA.png)\rand
6
+ B: ![]({{ images_dir }}/p_194_GraphB.png), where the units are glued along\rthe
7
+ vertical edges as in the graph ![]({{ images_dir }}/p_194_Fig.png).\n\nA configuration
8
+ of type (<var>a</var>,<var>b</var>,<var>c</var>) is a graph thus built of <var>a</var>
9
+ units A and <var>b</var> units B, where the graph's vertices are coloured using
10
+ up to <var>c</var> colours, so that no two adjacent vertices have the same colour.
11
+ \ \n\rThe compound graph above is an example of a configuration of type (2,2,6),
12
+ in fact of type (2,2,<var>c</var>) for all <var>c</var> ![≥]({{ images_dir }}/symbol_ge.gif)
13
13
  4.\n\nLet N(<var>a</var>,<var>b</var>,<var>c</var>) be the number of configurations
14
14
  of type (<var>a</var>,<var>b</var>,<var>c</var>). \n\rFor example, N(1,0,3) = 24,
15
15
  N(0,2,4) = 92928 and N(2,2,3) = 20736.\n\nFind the last 8 digits of N(25,75,1984).\n\n"
@@ -5,7 +5,7 @@
5
5
  :content: "Let's call an integer sided triangle with exactly one angle of 60 degrees
6
6
  a 60-degree triangle. \n\rLet <var>r</var> be the radius of the inscribed circle
7
7
  of such a 60-degree triangle.\n\nThere are 1234 60-degree triangles for which <var>r</var>
8
- ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 100.\r \nLet
9
- T(<var>n</var>) be the number of 60-degree triangles for which <var>r</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
+ ![≤]({{ images_dir }}/symbol_le.gif) 100.\r \nLet T(<var>n</var>) be the number
9
+ of 60-degree triangles for which <var>r</var> ![≤]({{ images_dir }}/symbol_le.gif)
10
10
  <var>n</var>, so \n\r T(100) = 1234,  T(1000) = 22767, and  T(10000) = 359912.\n\nFind
11
11
  T(1053779).\n\n"
@@ -2,11 +2,10 @@
2
2
  :id: 197
3
3
  :name: Investigating the behaviour of a recursively defined sequence
4
4
  :url: http://projecteuler.net/problem=197
5
- :content: "Given is the function <var>f</var>(<var>x</var>) = ![⌊](/home/will/src/euler-manager/config/../data/images/symbol_lfloor.gif)2<sup>30.403243784-<var>x</var><sup>2</sup></sup>
6
- ![⌋](/home/will/src/euler-manager/config/../data/images/symbol_rfloor.gif) ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
7
- 10<sup>-9</sup> ( ![⌊](/home/will/src/euler-manager/config/../data/images/symbol_lfloor.gif)
8
- ![⌋](/home/will/src/euler-manager/config/../data/images/symbol_rfloor.gif) is the
9
- floor-function), \n\rthe sequence <var>u<sub>n</sub></var> is defined by <var>u</var><sub>0</sub>
10
- = -1 and <var>u</var><sub><var>n</var>+1</sub> = <var>f</var>(<var>u<sub>n</sub></var>).\n\nFind
5
+ :content: "Given is the function <var>f</var>(<var>x</var>) = ![⌊]({{ images_dir }}/symbol_lfloor.gif)2<sup>30.403243784-<var>x</var><sup>2</sup></sup>
6
+ ![⌋]({{ images_dir }}/symbol_rfloor.gif) ![×]({{ images_dir }}/symbol_times.gif)
7
+ 10<sup>-9</sup> ( ![⌊]({{ images_dir }}/symbol_lfloor.gif) ![⌋]({{ images_dir }}/symbol_rfloor.gif)
8
+ is the floor-function), \n\rthe sequence <var>u<sub>n</sub></var> is defined by
9
+ <var>u</var><sub>0</sub> = -1 and <var>u</var><sub><var>n</var>+1</sub> = <var>f</var>(<var>u<sub>n</sub></var>).\n\nFind
11
10
  <var>u<sub>n</sub></var> + <var>u</var><sub><var>n</var>+1</sub> for <var>n</var>
12
11
  = 10<sup>12</sup>. \n\rGive your answer with 9 digits after the decimal point.\n\n"
@@ -4,15 +4,14 @@
4
4
  :url: http://projecteuler.net/problem=198
5
5
  :content: "A best approximation to a real number <var>x</var> for the denominator
6
6
  bound <var>d</var> is a rational number <var>r</var>/<var>s</var> (in reduced form)
7
- with <var>s</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
- <var>d</var>, so that any rational number <var>p</var>/<var>q</var> which is closer
9
- to <var>x</var> than <var>r</var>/<var>s</var> has <var>q</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
10
- <var>d</var>.\n\nUsually the best approximation to a real number is uniquely determined
11
- for all denominator bounds. However, there are some exceptions, e.g. 9/40 has the
12
- two best approximations 1/4 and 1/5 for the denominator bound 6.\rWe shall call
13
- a real number <var>x</var> _ambiguous_, if there is at least one denominator bound
14
- for which <var>x</var> possesses two best approximations. Clearly, an ambiguous
15
- number is necessarily rational.\n\nHow many ambiguous numbers <var>x</var> = <var>p</var>/<var>q</var>,\r0
16
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>x</var>
17
- ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 1/100, are
18
- there whose denominator <var>q</var> does not exceed 10<sup>8</sup>?\n\n"
7
+ with <var>s</var> ![≤]({{ images_dir }}/symbol_le.gif) <var>d</var>, so that any
8
+ rational number <var>p</var>/<var>q</var> which is closer to <var>x</var> than <var>r</var>/<var>s</var>
9
+ has <var>q</var> ![>]({{ images_dir }}/symbol_gt.gif) <var>d</var>.\n\nUsually the
10
+ best approximation to a real number is uniquely determined for all denominator bounds.
11
+ However, there are some exceptions, e.g. 9/40 has the two best approximations 1/4
12
+ and 1/5 for the denominator bound 6.\rWe shall call a real number <var>x</var> _ambiguous_,
13
+ if there is at least one denominator bound for which <var>x</var> possesses two
14
+ best approximations. Clearly, an ambiguous number is necessarily rational.\n\nHow
15
+ many ambiguous numbers <var>x</var> = <var>p</var>/<var>q</var>,\r0 ![<]({{ images_dir
16
+ }}/symbol_lt.gif) <var>x</var> ![<]({{ images_dir }}/symbol_lt.gif) 1/100, are there
17
+ whose denominator <var>q</var> does not exceed 10<sup>8</sup>?\n\n"
@@ -5,10 +5,10 @@
5
5
  :content: "Three circles of equal radius are placed inside a larger circle such that
6
6
  each pair of circles is tangent to one another and the inner circles do not overlap.
7
7
  There are four uncovered \"gaps\" which are to be filled iteratively with more tangent
8
- circles.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_199_circles_in_circles.gif)\n\nAt
9
- each iteration, a maximally sized circle is placed in each gap, which creates more
10
- gaps for the next iteration. After 3 iterations (pictured), there are 108 gaps and
11
- the fraction of the area which is not covered by circles is 0.06790342, rounded
12
- to eight decimal places.\n\nWhat fraction of the area is not covered by circles
13
- after 10 iterations? \n\rGive your answer rounded to eight decimal places using
14
- the format x.xxxxxxxx .\n\n"
8
+ circles.\n\n ![]({{ images_dir }}/p_199_circles_in_circles.gif)\n\nAt each iteration,
9
+ a maximally sized circle is placed in each gap, which creates more gaps for the
10
+ next iteration. After 3 iterations (pictured), there are 108 gaps and the fraction
11
+ of the area which is not covered by circles is 0.06790342, rounded to eight decimal
12
+ places.\n\nWhat fraction of the area is not covered by circles after 10 iterations?
13
+ \ \n\rGive your answer rounded to eight decimal places using the format x.xxxxxxxx
14
+ .\n\n"
data/data/problems/20.yml CHANGED
@@ -2,13 +2,11 @@
2
2
  :id: 20
3
3
  :name: Factorial digit sum
4
4
  :url: http://projecteuler.net/problem=20
5
- :content: "_n_! means _n_ ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
6
- (_n_ ![](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif) 1)
7
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) ... ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
8
- 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
9
- 1\n\nFor example, 10! = 10 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
10
- 9 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) ...
11
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
12
- 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 1 =
13
- 3628800, \nand the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0
14
- + 0 = 27.\n\nFind the sum of the digits in the number 100!\n\n"
5
+ :content: "_n_! means _n_ ![×]({{ images_dir }}/symbol_times.gif) (_n_ ![−]({{ images_dir
6
+ }}/symbol_minus.gif) 1) ![×]({{ images_dir }}/symbol_times.gif) ... ![×]({{ images_dir
7
+ }}/symbol_times.gif) 3 ![×]({{ images_dir }}/symbol_times.gif) 2 ![×]({{ images_dir
8
+ }}/symbol_times.gif) 1\n\nFor example, 10! = 10 ![×]({{ images_dir }}/symbol_times.gif)
9
+ 9 ![×]({{ images_dir }}/symbol_times.gif) ... ![×]({{ images_dir }}/symbol_times.gif)
10
+ 3 ![×]({{ images_dir }}/symbol_times.gif) 2 ![×]({{ images_dir }}/symbol_times.gif)
11
+ 1 = 3628800, \nand the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8
12
+ + 0 + 0 = 27.\n\nFind the sum of the digits in the number 100!\n\n"
@@ -7,7 +7,7 @@
7
7
 
8
8
  Label the vertices A, B and C. There are 2 ways in which a laser beam may enter vertex C, bounce off 11 surfaces, then exit through the same vertex: one way is shown below; the other is the reverse of that.
9
9
 
10
- ![](/home/will/src/euler-manager/config/../data/images/p_201_laserbeam.gif)
10
+ ![]({{ images_dir }}/p_201_laserbeam.gif)
11
11
 
12
12
  There are 80840 ways in which a laser beam may enter vertex C, bounce off 1000001 surfaces, then exit through the same vertex.
13
13
 
@@ -8,10 +8,10 @@
8
8
  real number.\n\nThe first two such partitions are 4<sup>1</sup> = 2<sup>1</sup>
9
9
  + 2 and 4<sup>1.5849625...</sup> = 2<sup>1.5849625...</sup> + 6.\n\nPartitions where
10
10
  <var>t</var> is also an integer are called _perfect_. \n \rFor any <var>m</var>
11
- ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif) 1 let P(<var>m</var>)
12
- be the proportion of such partitions that are perfect with <var>k</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
+ ![≥]({{ images_dir }}/symbol_ge.gif) 1 let P(<var>m</var>) be the proportion of
12
+ such partitions that are perfect with <var>k</var> ![≤]({{ images_dir }}/symbol_le.gif)
13
13
  <var>m</var>. \n\rThus P(6) = 1/2.\n\nIn the following table are listed some values
14
14
  of P(<var>m</var>)\n\n   P(5) = 1/1 \n\r   P(10) = 1/2 \n\r   P(15) = 2/3 \n\r   P(20)
15
15
  = 1/2 \n\r   P(25) = 1/2 \n\r   P(30) = 2/5 \n\r   ... \n\r   P(180) = 1/4 \n\r   P(185)
16
- = 3/13\n\nFind the smallest <var>m</var> for which P(<var>m</var>) ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif)
17
- 1/12345\n\n"
16
+ = 3/13\n\nFind the smallest <var>m</var> for which P(<var>m</var>) ![<]({{ images_dir
17
+ }}/symbol_lt.gif) 1/12345\n\n"
@@ -5,8 +5,7 @@
5
5
  :content: "A robot moves in a series of one-fifth circular arcs (72°), with a free
6
6
  choice of a clockwise or an anticlockwise arc for each step, but no turning on the
7
7
  spot.\n\nOne of 70932 possible closed paths of 25 arcs starting northward is\n\n
8
- ![](/home/will/src/euler-manager/config/../data/images/p_208_robotwalk.gif)\n\nGiven
9
- that the robot starts facing North, how many journeys of 70 arcs in length can it
10
- take that return it, after the final arc, to its starting position? \n<!--(Journeys
11
- are allowed to return multiple times to the start.)-->\r(Any arc may be traversed
12
- multiple times.)\n\n"
8
+ ![]({{ images_dir }}/p_208_robotwalk.gif)\n\nGiven that the robot starts facing
9
+ North, how many journeys of 70 arcs in length can it take that return it, after
10
+ the final arc, to its starting position? \n<!--(Journeys are allowed to return
11
+ multiple times to the start.)-->\r(Any arc may be traversed multiple times.)\n\n"
data/data/problems/21.yml CHANGED
@@ -4,9 +4,8 @@
4
4
  :url: http://projecteuler.net/problem=21
5
5
  :content: "Let d(_n_) be defined as the sum of proper divisors of _n_ (numbers less
6
6
  than _n_ which divide evenly into _n_). \n\rIf d(_a_) = _b_ and d(_b_) = _a_, where
7
- _a_ ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif) _b_,
8
- then _a_ and _b_ are an amicable pair and each of _a_ and _b_ are called amicable
9
- numbers.\n\nFor example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20,
10
- 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2,
11
- 4, 71 and 142; so d(284) = 220.\n\nEvaluate the sum of all the amicable numbers
12
- under 10000.\n\n"
7
+ _a_ ![≠]({{ images_dir }}/symbol_ne.gif) _b_, then _a_ and _b_ are an amicable pair
8
+ and each of _a_ and _b_ are called amicable numbers.\n\nFor example, the proper
9
+ divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220)
10
+ = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220.\n\nEvaluate
11
+ the sum of all the amicable numbers under 10000.\n\n"
@@ -3,8 +3,7 @@
3
3
  :name: Obtuse Angled Triangles
4
4
  :url: http://projecteuler.net/problem=210
5
5
  :content: "\rConsider the set S(r) of points (x,y) with integer coordinates satisfying
6
- |x| + |y| ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
- r. \n\rLet O be the point (0,0) and C the point (r/4,r/4). \n\rLet N(r) be the
8
- number of points B in S(r), so that the triangle OBC has an obtuse angle, i.e. the
9
- largest angle α satisfies 90°\rSo, for example, N(4)=24 and N(8)=100.\r\n\nWhat
10
- is N(1,000,000,000)?\n\n"
6
+ |x| + |y| ![≤]({{ images_dir }}/symbol_le.gif) r. \n\rLet O be the point (0,0)
7
+ and C the point (r/4,r/4). \n\rLet N(r) be the number of points B in S(r), so
8
+ that the triangle OBC has an obtuse angle, i.e. the largest angle α satisfies 90°\rSo,
9
+ for example, N(4)=24 and N(8)=100.\r\n\nWhat is N(1,000,000,000)?\n\n"
@@ -7,5 +7,5 @@
7
7
 
8
8
  σ<sub>2</sub>(10) = 1 + 4 + 25 + 100 = 130.
9
9
 
10
- Find the sum of all <var>n</var>, 0 ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) <var>n</var> ![<](/home/will/src/euler-manager/config/../data/images/symbol_lt.gif) 64,000,000 such that σ<sub>2</sub>(<var>n</var>) is a perfect square.
10
+ Find the sum of all <var>n</var>, 0 ![<]({{ images_dir }}/symbol_lt.gif) <var>n</var> ![<]({{ images_dir }}/symbol_lt.gif) 64,000,000 such that σ<sub>2</sub>(<var>n</var>) is a perfect square.
11
11
 
@@ -3,29 +3,25 @@
3
3
  :name: Combined Volume of Cuboids
4
4
  :url: http://projecteuler.net/problem=212
5
5
  :content: "An axis-aligned cuboid, specified by parameters { (x<sub>0</sub>,y<sub>0</sub>,z<sub>0</sub>),
6
- (dx,dy,dz) }, consists of all points (X,Y,Z) such that x<sub>0</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
- X ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) x<sub>0</sub>+dx,
8
- y<sub>0</sub> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
9
- Y ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) y<sub>0</sub>+dy
10
- and z<sub>0</sub> ![](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
- Z ![](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) z<sub>0</sub>+dz.
12
- The volume of the cuboid is the product, dx ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
13
- dy ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) dz.
14
- The combined volume of a collection of cuboids is the volume of their union and
15
- will be less than the sum of the individual volumes if any cuboids overlap.\n\nLet
16
- C<sub>1</sub>,...,C<sub>50000</sub> be a collection of 50000 axis-aligned cuboids
17
- such that C<sub><var>n</var></sub> has parameters\n\nx<sub>0</sub> = S<sub>6<var>n</var>-5</sub>
18
- modulo 10000 \ny<sub>0</sub> = S<sub>6<var>n</var>-4</sub> modulo 10000 \nz<sub>0</sub>
19
- = S<sub>6<var>n</var>-3</sub> modulo 10000 \ndx = 1 + (S<sub>6<var>n</var>-2</sub>
20
- modulo 399) \ndy = 1 + (S<sub>6<var>n</var>-1</sub> modulo 399) \ndz = 1 + (S<sub>6<var>n</var></sub>
21
- modulo 399)\n\nwhere S<sub>1</sub>,...,S<sub>300000</sub> come from the \"Lagged
22
- Fibonacci Generator\":\n\nFor 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
23
- <var>k</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
24
- 55, S<sub><var>k</var></sub> = [100003 - 200003<var>k</var> + 300007<var>k</var><sup>3</sup>]
25
-   (modulo 1000000) \nFor 56 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
26
- <var>k</var>, S<sub><var>k</var></sub> = [S<sub><var>k</var>-24</sub> + S<sub><var>k</var>-55</sub>]
27
-   (modulo 1000000)\n\nThus, C<sub>1</sub> has parameters {(7,53,183),(94,369,56)},
28
- C<sub>2</sub> has parameters {(2383,3563,5079),(42,212,344)}, and so on.\n\nThe
29
- combined volume of the first 100 cuboids, C<sub>1</sub>,...,C<sub>100</sub>, is
30
- 723581599.\n\nWhat is the combined volume of all 50000 cuboids, C<sub>1</sub>,...,C<sub>50000</sub>
31
- ?\n\n"
6
+ (dx,dy,dz) }, consists of all points (X,Y,Z) such that x<sub>0</sub> ![≤]({{ images_dir
7
+ }}/symbol_le.gif) X ![≤]({{ images_dir }}/symbol_le.gif) x<sub>0</sub>+dx, y<sub>0</sub>
8
+ ![≤]({{ images_dir }}/symbol_le.gif) Y ![≤]({{ images_dir }}/symbol_le.gif) y<sub>0</sub>+dy
9
+ and z<sub>0</sub> ![≤]({{ images_dir }}/symbol_le.gif) Z ![≤]({{ images_dir }}/symbol_le.gif)
10
+ z<sub>0</sub>+dz. The volume of the cuboid is the product, dx ![×]({{ images_dir
11
+ }}/symbol_times.gif) dy ![×]({{ images_dir }}/symbol_times.gif) dz. The combined
12
+ volume of a collection of cuboids is the volume of their union and will be less
13
+ than the sum of the individual volumes if any cuboids overlap.\n\nLet C<sub>1</sub>,...,C<sub>50000</sub>
14
+ be a collection of 50000 axis-aligned cuboids such that C<sub><var>n</var></sub>
15
+ has parameters\n\nx<sub>0</sub> = S<sub>6<var>n</var>-5</sub> modulo 10000 \ny<sub>0</sub>
16
+ = S<sub>6<var>n</var>-4</sub> modulo 10000 \nz<sub>0</sub> = S<sub>6<var>n</var>-3</sub>
17
+ modulo 10000 \ndx = 1 + (S<sub>6<var>n</var>-2</sub> modulo 399) \ndy = 1 + (S<sub>6<var>n</var>-1</sub>
18
+ modulo 399) \ndz = 1 + (S<sub>6<var>n</var></sub> modulo 399)\n\nwhere S<sub>1</sub>,...,S<sub>300000</sub>
19
+ come from the \"Lagged Fibonacci Generator\":\n\nFor 1 ![≤]({{ images_dir }}/symbol_le.gif)
20
+ <var>k</var> ![≤]({{ images_dir }}/symbol_le.gif) 55, S<sub><var>k</var></sub> =
21
+ [100003 - 200003<var>k</var> + 300007<var>k</var><sup>3</sup>]   (modulo 1000000)
22
+ \ \nFor 56 ![≤]({{ images_dir }}/symbol_le.gif) <var>k</var>, S<sub><var>k</var></sub>
23
+ = [S<sub><var>k</var>-24</sub> + S<sub><var>k</var>-55</sub>]   (modulo 1000000)\n\nThus,
24
+ C<sub>1</sub> has parameters {(7,53,183),(94,369,56)}, C<sub>2</sub> has parameters
25
+ {(2383,3563,5079),(42,212,344)}, and so on.\n\nThe combined volume of the first
26
+ 100 cuboids, C<sub>1</sub>,...,C<sub>100</sub>, is 723581599.\n\nWhat is the combined
27
+ volume of all 50000 cuboids, C<sub>1</sub>,...,C<sub>50000</sub> ?\n\n"
@@ -2,9 +2,8 @@
2
2
  :id: 213
3
3
  :name: Flea Circus
4
4
  :url: http://projecteuler.net/problem=213
5
- :content: "A 30 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)30
6
- grid of squares contains 900 fleas, initially one flea per square. \n\rWhen a bell
7
- is rung, each flea jumps to an adjacent square at random (usually 4 possibilities,
8
- except for fleas on the edge of the grid or at the corners).\n\nWhat is the expected
9
- number of unoccupied squares after 50 rings of the bell? Give your answer rounded
10
- to six decimal places.\n\n"
5
+ :content: "A 30 ![×]({{ images_dir }}/symbol_times.gif)30 grid of squares contains
6
+ 900 fleas, initially one flea per square. \n\rWhen a bell is rung, each flea jumps
7
+ to an adjacent square at random (usually 4 possibilities, except for fleas on the
8
+ edge of the grid or at the corners).\n\nWhat is the expected number of unoccupied
9
+ squares after 50 rings of the bell? Give your answer rounded to six decimal places.\n\n"
@@ -3,12 +3,11 @@
3
3
  :name: Totient Chains
4
4
  :url: http://projecteuler.net/problem=214
5
5
  :content: "Let φ be Euler's totient function, i.e. for a natural number <var>n</var>,\rφ(<var>n</var>)
6
- is the number of <var>k</var>, 1 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
7
- <var>k</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
8
- <var>n</var>, for which gcd(<var>k</var>,<var>n</var>) = 1.\n\nBy iterating φ, each
9
- positive integer generates a decreasing chain of numbers ending in 1. \n\rE.g.
10
- if we start with 5 the sequence 5,4,2,1 is generated. \n\rHere is a listing of
11
- all chains with length 4:\n\n\r5,4,2,1 \n\r7,6,2,1 \n\r8,4,2,1 \n\r9,6,2,1 \n\r10,4,2,1
12
- \ \n\r12,4,2,1 \n\r14,6,2,1 \n\r18,6,2,1\n\nOnly two of these chains start with
13
- a prime, their sum is 12.\n\nWhat is the sum of all primes less than 40000000 which
14
- generate a chain of length 25?\n\n"
6
+ is the number of <var>k</var>, 1 ![≤]({{ images_dir }}/symbol_le.gif) <var>k</var>
7
+ ![≤]({{ images_dir }}/symbol_le.gif) <var>n</var>, for which gcd(<var>k</var>,<var>n</var>)
8
+ = 1.\n\nBy iterating φ, each positive integer generates a decreasing chain of numbers
9
+ ending in 1. \n\rE.g. if we start with 5 the sequence 5,4,2,1 is generated. \n\rHere
10
+ is a listing of all chains with length 4:\n\n\r5,4,2,1 \n\r7,6,2,1 \n\r8,4,2,1
11
+ \ \n\r9,6,2,1 \n\r10,4,2,1 \n\r12,4,2,1 \n\r14,6,2,1 \n\r18,6,2,1\n\nOnly two
12
+ of these chains start with a prime, their sum is 12.\n\nWhat is the sum of all primes
13
+ less than 40000000 which generate a chain of length 25?\n\n"
@@ -3,13 +3,13 @@
3
3
  :name: Crack-free Walls
4
4
  :url: http://projecteuler.net/problem=215
5
5
  :content: |+
6
- Consider the problem of building a wall out of 2 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)1 and 3 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)1 bricks (horizontal ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)vertical dimensions) such that, for extra strength, the gaps between horizontally-adjacent bricks never line up in consecutive layers, i.e. never form a "running crack".
6
+ Consider the problem of building a wall out of 2 ![×]({{ images_dir }}/symbol_times.gif)1 and 3 ![×]({{ images_dir }}/symbol_times.gif)1 bricks (horizontal ![×]({{ images_dir }}/symbol_times.gif)vertical dimensions) such that, for extra strength, the gaps between horizontally-adjacent bricks never line up in consecutive layers, i.e. never form a "running crack".
7
7
 
8
- For example, the following 9 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3 wall is not acceptable due to the running crack shown in red:
8
+ For example, the following 9 ![×]({{ images_dir }}/symbol_times.gif)3 wall is not acceptable due to the running crack shown in red:
9
9
 
10
- ![](/home/will/src/euler-manager/config/../data/images/p_215_crackfree.gif)
10
+ ![]({{ images_dir }}/p_215_crackfree.gif)
11
11
 
12
- There are eight ways of forming a crack-free 9 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)3 wall, written W(9,3) = 8.
12
+ There are eight ways of forming a crack-free 9 ![×]({{ images_dir }}/symbol_times.gif)3 wall, written W(9,3) = 8.
13
13
 
14
14
  Calculate W(32,10).
15
15
 
@@ -3,9 +3,9 @@
3
3
  :name: Investigating the primality of numbers of the form 2<var>n</var><sup>2</sup>-1
4
4
  :url: http://projecteuler.net/problem=216
5
5
  :content: "Consider numbers <var>t</var>(<var>n</var>) of the form <var>t</var>(<var>n</var>)
6
- = 2<var>n</var><sup>2</sup>-1 with <var>n</var> ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
6
+ = 2<var>n</var><sup>2</sup>-1 with <var>n</var> ![>]({{ images_dir }}/symbol_gt.gif)
7
7
  1. \n\rThe first such numbers are 7, 17, 31, 49, 71, 97, 127 and 161. \n\rIt turns
8
- out that only 49 = 7\\*7 and 161 = 7\\*23 are not prime. \n\rFor <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
9
- 10000 there are 2202 numbers <var>t</var>(<var>n</var>) that are prime.\n\nHow many
10
- numbers <var>t</var>(<var>n</var>) are prime for <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
11
- 50,000,000 ?\n\n"
8
+ out that only 49 = 7\\*7 and 161 = 7\\*23 are not prime. \n\rFor <var>n</var> ![≤]({{
9
+ images_dir }}/symbol_le.gif) 10000 there are 2202 numbers <var>t</var>(<var>n</var>)
10
+ that are prime.\n\nHow many numbers <var>t</var>(<var>n</var>) are prime for <var>n</var>
11
+ ![≤]({{ images_dir }}/symbol_le.gif) 50,000,000 ?\n\n"
@@ -3,16 +3,14 @@
3
3
  :name: Balanced Numbers
4
4
  :url: http://projecteuler.net/problem=217
5
5
  :content: "A positive integer with <var>k</var> (decimal) digits is called balanced
6
- if its first ![⌈](/home/will/src/euler-manager/config/../data/images/symbol_lceil.gif)<sup><var>k</var></sup>/<sub>2</sub>
7
- ![⌉](/home/will/src/euler-manager/config/../data/images/symbol_rceil.gif) digits
8
- sum to the same value as its last ![⌈](/home/will/src/euler-manager/config/../data/images/symbol_lceil.gif)<sup><var>k</var></sup>/<sub>2</sub>
9
- ![](/home/will/src/euler-manager/config/../data/images/symbol_rceil.gif) digits,
10
- where ![](/home/will/src/euler-manager/config/../data/images/symbol_lceil.gif)<var>x</var>
11
- ![](/home/will/src/euler-manager/config/../data/images/symbol_rceil.gif), pronounced
12
- ceiling of <var>x</var>, is the smallest integer ![](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
13
- <var>x</var>, thus ![⌈](/home/will/src/euler-manager/config/../data/images/symbol_lceil.gif)π
14
- ![⌉](/home/will/src/euler-manager/config/../data/images/symbol_rceil.gif) = 4 and
15
- ![⌈](/home/will/src/euler-manager/config/../data/images/symbol_lceil.gif)5 ![⌉](/home/will/src/euler-manager/config/../data/images/symbol_rceil.gif)
6
+ if its first ![⌈]({{ images_dir }}/symbol_lceil.gif)<sup><var>k</var></sup>/<sub>2</sub>
7
+ ![⌉]({{ images_dir }}/symbol_rceil.gif) digits sum to the same value as its last
8
+ ![⌈]({{ images_dir }}/symbol_lceil.gif)<sup><var>k</var></sup>/<sub>2</sub> ![⌉]({{
9
+ images_dir }}/symbol_rceil.gif) digits, where ![]({{ images_dir }}/symbol_lceil.gif)<var>x</var>
10
+ ![]({{ images_dir }}/symbol_rceil.gif), pronounced ceiling of <var>x</var>, is
11
+ the smallest integer ![]({{ images_dir }}/symbol_ge.gif) <var>x</var>, thus ![⌈]({{
12
+ images_dir }}/symbol_lceil.gif)π ![]({{ images_dir }}/symbol_rceil.gif) = 4 and
13
+ ![⌈]({{ images_dir }}/symbol_lceil.gif)5 ![⌉]({{ images_dir }}/symbol_rceil.gif)
16
14
  = 5.\n\nSo, for example, all palindromes are balanced, as is 13722.\n\nLet T(<var>n</var>)
17
15
  be the sum of all balanced numbers less than 10<sup><var>n</var></sup>. \n\rThus:
18
16
  T(1) = 45, T(2) = 540 and T(5) = 334795890.\n\nFind T(47) mod 3<sup>15</sup>\n\n"
@@ -9,5 +9,5 @@
9
9
  if \n\r-it is a primitive right angled triangle \n\r-its hypotenuse is a perfect
10
10
  square\n\nWe will call a right angled triangle super-perfect if \n\r-it is a perfect
11
11
  right angled triangle and \n\r-its area is a multiple of the perfect numbers 6
12
- and 28.\n\nHow many perfect right-angled triangles with c ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)10<sup>16</sup>
12
+ and 28.\n\nHow many perfect right-angled triangles with c ![≤]({{ images_dir }}/symbol_le.gif)10<sup>16</sup>
13
13
  exist that are not super-perfect?\n\n"
data/data/problems/22.yml CHANGED
@@ -5,7 +5,7 @@
5
5
  :content: |+
6
6
  Using [names.txt](project/names.txt) (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score.
7
7
 
8
- For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 53 = 49714.
8
+ For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 ![×]({{ images_dir }}/symbol_times.gif) 53 = 49714.
9
9
 
10
10
  What is the total of all the name scores in the file?
11
11
 
@@ -2,18 +2,18 @@
2
2
  :id: 220
3
3
  :name: Heighway Dragon
4
4
  :url: http://projecteuler.net/problem=220
5
- :content: "Let **_D_** <sub>0</sub> be the two-letter string \"Fa\". For n ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)1,
6
- derive **_D_** <sub>n</sub> from **_D_** <sub>n-1</sub> by the string-rewriting
7
- rules:\n\n\"a\" ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
8
- \"aRbFR\" \n\r\"b\" ![→](/home/will/src/euler-manager/config/../data/images/symbol_maps.gif)
9
- \"LFaLb\"\n\nThus, **_D_** <sub>0</sub> = \"Fa\", **_D_** <sub>1</sub> = \"FaRbFR\",
10
- **_D_** <sub>2</sub> = \"FaRbFRRLFaLbFR\", and so on.\n\nThese strings can be interpreted
11
- as instructions to a computer graphics program, with \"F\" meaning \"draw forward
12
- one unit\", \"L\" meaning \"turn left 90 degrees\", \"R\" meaning \"turn right 90
13
- degrees\", and \"a\" and \"b\" being ignored. The initial position of the computer
14
- cursor is (0,0), pointing up towards (0,1).\n\nThen **_D_** <sub>n</sub> is an exotic
15
- drawing known as the _Heighway Dragon_ of order _n_. For example, **_D_** <sub>10</sub>
16
- is shown below; counting each \"F\" as one step, the highlighted spot at (18,16)
17
- is the position reached after 500 steps.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_220.gif)\n\nWhat
18
- is the position of the cursor after 10<sup>12</sup> steps in **_D_** <sub>50</sub>
19
- ? \n\rGive your answer in the form _x_,_y_ with no spaces.\n\n"
5
+ :content: "Let **_D_** <sub>0</sub> be the two-letter string \"Fa\". For n ![≥]({{
6
+ images_dir }}/symbol_ge.gif)1, derive **_D_** <sub>n</sub> from **_D_** <sub>n-1</sub>
7
+ by the string-rewriting rules:\n\n\"a\" ![→]({{ images_dir }}/symbol_maps.gif) \"aRbFR\"
8
+ \ \n\r\"b\" ![→]({{ images_dir }}/symbol_maps.gif) \"LFaLb\"\n\nThus, **_D_** <sub>0</sub>
9
+ = \"Fa\", **_D_** <sub>1</sub> = \"FaRbFR\", **_D_** <sub>2</sub> = \"FaRbFRRLFaLbFR\",
10
+ and so on.\n\nThese strings can be interpreted as instructions to a computer graphics
11
+ program, with \"F\" meaning \"draw forward one unit\", \"L\" meaning \"turn left
12
+ 90 degrees\", \"R\" meaning \"turn right 90 degrees\", and \"a\" and \"b\" being
13
+ ignored. The initial position of the computer cursor is (0,0), pointing up towards
14
+ (0,1).\n\nThen **_D_** <sub>n</sub> is an exotic drawing known as the _Heighway
15
+ Dragon_ of order _n_. For example, **_D_** <sub>10</sub> is shown below; counting
16
+ each \"F\" as one step, the highlighted spot at (18,16) is the position reached
17
+ after 500 steps.\n\n ![]({{ images_dir }}/p_220.gif)\n\nWhat is the position of
18
+ the cursor after 10<sup>12</sup> steps in **_D_** <sub>50</sub> ? \n\rGive your
19
+ answer in the form _x_,_y_ with no spaces.\n\n"
@@ -7,8 +7,7 @@
7
7
  <var>A</var> = <var>p</var> · <var>q</var> · <var>r</var>    and  \r | \n\n| 1 |\n|
8
8
  <var>A</var> |\n\n | = | \n\n| 1 |\n| <var>p</var> |\n\n | + | \n\n| 1 |\n| <var>q</var>
9
9
  |\n\n | + | \n\n| 1 |\n| <var>r</var> |\n\n |\n\nFor example, 630 is an Alexandrian
10
- integer (<var>p</var> = 5, <var>q</var> =  ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)7,
11
- <var>r</var> =  ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)18).\rIn
12
- fact, 630 is the 6<sup>th</sup> Alexandrian integer, the first 6 Alexandrian integers
13
- being: 6, 42, 120, 156, 420 and 630.\n\nFind the 150000<sup>th</sup> Alexandrian
14
- integer.\n\n"
10
+ integer (<var>p</var> = 5, <var>q</var> =  ![−]({{ images_dir }}/symbol_minus.gif)7,
11
+ <var>r</var> =  ![−]({{ images_dir }}/symbol_minus.gif)18).\rIn fact, 630 is the
12
+ 6<sup>th</sup> Alexandrian integer, the first 6 Alexandrian integers being: 6, 42,
13
+ 120, 156, 420 and 630.\n\nFind the 150000<sup>th</sup> Alexandrian integer.\n\n"