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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e90c9b3d1cc614aeb71d8428a7fb0b1fb3b384ea
4
- data.tar.gz: 5b234590374b00580be2cc1306a244e88f9132d9
3
+ metadata.gz: 0e9f7edbc9e03e21533e53f4670a3f0378e0a9b0
4
+ data.tar.gz: 78681dcecae1397d1b26616d9a319c60192685d3
5
5
  SHA512:
6
- metadata.gz: b22baaa6350550a9277e41759d2cbb80d1741aab9bca6c5e27328228f3e3d9f466d1283e8079374bf1b4d4d8919164334b77e8e08be822f1c89f15f94466f320
7
- data.tar.gz: 899416d1dc83cb1988fa1c8f1de9d12d852e2a8c48c6a0bc9e302c4f144c5fcc109d47740e86e7e04bea3b855abe7ff728969485ce00807a6d591ae2ec2ad0a7
6
+ metadata.gz: e18b00ed9af02b068bb515bf28337396e29bfce9e38ad6154bb035e5b7dff72490cde7a7ca293ed056651b346c53918ca8321b5e6e849c66e463182af1b71ff4
7
+ data.tar.gz: 8b6a417585f284da8107ec3241d854b35e1369d6fbd6b24adec36db8f1eadb124b0d5d6a5f66558aa5d5443b041e8463aee54df1afca6fc9f420099b8bdcd621
data/README.md CHANGED
@@ -109,3 +109,16 @@ required.
109
109
 
110
110
  For more examples of registering languages see the `/lib/euler/languages`
111
111
  directory or the `Eulerfile.rb` in the `/example` directory.
112
+
113
+ ## Contributing
114
+
115
+ Pull requests are welcome!
116
+
117
+ Please send pull requests to the `develop` branch.
118
+
119
+ ### To Do
120
+
121
+ - add more languages
122
+ - better error messages
123
+ - documentation could be better?
124
+ - tests could probably be better too
@@ -45,6 +45,10 @@
45
45
  </div>
46
46
 
47
47
  <div id="content">
48
+ <div id="notification">
49
+ <p><strong>NOTICE: </strong> Please read the <a href="news">News</a> to explain why the website is currently operating in reduced functionality.</p>
50
+ </div>
51
+ <br />
48
52
  <h2>Problems</h2>
49
53
 
50
54
  <div class="pagination"><a href="problems" class="current">1</a><a href="problems;page=2" title="Go to page 2">2</a><a href="problems;page=3" title="Go to page 3">3</a><a href="problems;page=4" title="Go to page 4">4</a><a href="problems;page=5" title="Go to page 5">5</a><a href="problems;page=6" title="Go to page 6">6</a><a href="problems;page=7" title="Go to page 7">7</a><a href="problems;page=8" title="Go to page 8">8</a><a href="problems;page=9" title="Go to page 9">9</a><a href="problems;page=10" title="Go to page 10">10</a><span>&nbsp;&nbsp;&nbsp;Go to Problem: <input type="text" id="jump_top" style="width:30px;" onkeypress="if (event.keyCode==13) location.href='problem='+this.value;" /></span></div><div style="clear:both;"></div><br /><table class="grid">
@@ -3,7 +3,7 @@
3
3
  :name: Arranged probability
4
4
  :url: http://projecteuler.net/problem=100
5
5
  :content: |+
6
- If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21) ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)(14/20) = 1/2.
6
+ If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21) ![×]({{ images_dir }}/symbol_times.gif)(14/20) = 1/2.
7
7
 
8
8
  The next such arrangement, for which there is exactly 50% chance of taking two blue discs at random, is a box containing eighty-five blue discs and thirty-five red discs.
9
9
 
@@ -14,23 +14,23 @@
14
14
  should be assumed.\n\nWe shall define OP(<var>k</var>, <var>n</var>) to be the <var>n</var><sup>th</sup>
15
15
  term of the optimum polynomial generating function for the first <var>k</var> terms
16
16
  of a sequence. It should be clear that OP(<var>k</var>, <var>n</var>) will accurately
17
- generate the terms of the sequence for <var>n</var> ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif)
17
+ generate the terms of the sequence for <var>n</var> ![≤]({{ images_dir }}/symbol_le.gif)
18
18
  <var>k</var>, and potentially the _first incorrect term_ (FIT) will be OP(<var>k</var>,
19
19
  <var>k</var>+1); in which case we shall call it a _bad OP_ (BOP).\n\nAs a basis,
20
20
  if we were only given the first term of sequence, it would be most sensible to assume
21
- constancy; that is, for <var>n</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
22
- 2, OP(1, <var>n</var>) = <var>u</var><sub>1</sub>.\n\nHence we obtain the following
23
- OPs for the cubic sequence:\n\n| OP(1, <var>n</var>) = 1 | 1, **1** , 1, 1, ...
24
- |\n| OP(2, <var>n</var>) = 7<var>n</var> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)6
25
- | 1, 8, **15** , ... |\n| OP(3, <var>n</var>) = 6<var>n</var><sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)11<var>n</var>+6     
21
+ constancy; that is, for <var>n</var> ![≥]({{ images_dir }}/symbol_ge.gif) 2, OP(1,
22
+ <var>n</var>) = <var>u</var><sub>1</sub>.\n\nHence we obtain the following OPs for
23
+ the cubic sequence:\n\n| OP(1, <var>n</var>) = 1 | 1, **1** , 1, 1, ... |\n| OP(2,
24
+ <var>n</var>) = 7<var>n</var> ![−]({{ images_dir }}/symbol_minus.gif)6 | 1, 8, **15**
25
+ , ... |\n| OP(3, <var>n</var>) = 6<var>n</var><sup>2</sup> ![−]({{ images_dir }}/symbol_minus.gif)11<var>n</var>+6     
26
26
  | 1, 8, 27, **58** , ... |\n| OP(4, <var>n</var>) = <var>n</var><sup>3</sup> | 1,
27
- 8, 27, 64, 125, ... |\n\nClearly no BOPs exist for <var>k</var> ![≥](/home/will/src/euler-manager/config/../data/images/symbol_ge.gif)
28
- 4.\n\nBy considering the sum of FITs generated by the BOPs (indicated in **red**
29
- above), we obtain 1 + 15 + 58 = 74.\n\nConsider the following tenth degree polynomial
30
- generating function:\n\n<var>u</var><sub><var>n</var></sub> = 1 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
31
- <var>n</var> + <var>n</var><sup>2</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
32
- <var>n</var><sup>3</sup> + <var>n</var><sup>4</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
33
- <var>n</var><sup>5</sup> + <var>n</var><sup>6</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
34
- <var>n</var><sup>7</sup> + <var>n</var><sup>8</sup> ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
35
- <var>n</var><sup>9</sup> + <var>n</var><sup>10</sup>\n\nFind the sum of FITs for
36
- the BOPs.\n\n"
27
+ 8, 27, 64, 125, ... |\n\nClearly no BOPs exist for <var>k</var> ![≥]({{ images_dir
28
+ }}/symbol_ge.gif) 4.\n\nBy considering the sum of FITs generated by the BOPs (indicated
29
+ in **red** above), we obtain 1 + 15 + 58 = 74.\n\nConsider the following tenth degree
30
+ polynomial generating function:\n\n<var>u</var><sub><var>n</var></sub> = 1 ![−]({{
31
+ images_dir }}/symbol_minus.gif) <var>n</var> + <var>n</var><sup>2</sup> ![−]({{
32
+ images_dir }}/symbol_minus.gif) <var>n</var><sup>3</sup> + <var>n</var><sup>4</sup>
33
+ ![−]({{ images_dir }}/symbol_minus.gif) <var>n</var><sup>5</sup> + <var>n</var><sup>6</sup>
34
+ ![−]({{ images_dir }}/symbol_minus.gif) <var>n</var><sup>7</sup> + <var>n</var><sup>8</sup>
35
+ ![−]({{ images_dir }}/symbol_minus.gif) <var>n</var><sup>9</sup> + <var>n</var><sup>10</sup>\n\nFind
36
+ the sum of FITs for the BOPs.\n\n"
@@ -3,9 +3,8 @@
3
3
  :name: Triangle containment
4
4
  :url: http://projecteuler.net/problem=102
5
5
  :content: "Three distinct points are plotted at random on a Cartesian plane, for which
6
- -1000 ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) _x_,
7
- _y_ ![≤](/home/will/src/euler-manager/config/../data/images/symbol_le.gif) 1000,
8
- such that a triangle is formed.\n\nConsider the following two triangles:\n\nA(-340,495),
6
+ -1000 ![≤]({{ images_dir }}/symbol_le.gif) _x_, _y_ ![≤]({{ images_dir }}/symbol_le.gif)
7
+ 1000, such that a triangle is formed.\n\nConsider the following two triangles:\n\nA(-340,495),
9
8
  B(-153,-910), C(835,-947) \n \n \nX(-175,41), Y(-421,-714), Z(574,-645)\n\nIt
10
9
  can be verified that triangle ABC contains the origin, whereas triangle XYZ does
11
10
  not.\n\nUsing [triangles.txt](project/triangles.txt) (right click and 'Save Link/Target
@@ -4,19 +4,19 @@
4
4
  :url: http://projecteuler.net/problem=103
5
5
  :content: "Let S(A) represent the sum of elements in set A of size _n_. We shall call
6
6
  it a special sum set if for any two non-empty disjoint subsets, B and C, the following
7
- properties are true:\n\n1. S(B) ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif)
8
- S(C); that is, sums of subsets cannot be equal.\n2. If B contains more elements
9
- than C then S(B) ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif)
10
- S(C).\n\nIf S(A) is minimised for a given _n_, we shall call it an optimum special
11
- sum set. The first five optimum special sum sets are given below.\n\n_n_ = 1: {1}
12
- \ \n_n_ = 2: {1, 2} \n_n_ = 3: {2, 3, 4} \n_n_ = 4: {3, 5, 6, 7} \n_n_ = 5: {6,
13
- 9, 11, 12, 13}\n\nIt _seems_ that for a given optimum set, A = {_a_<sub>1</sub>,
14
- _a_<sub>2</sub>, ... , _a_<sub>n</sub>}, the next optimum set is of the form B =
15
- {_b_, _a_<sub>1</sub>+_b_, _a_<sub>2</sub>+_b_, ... ,_a_<sub>n</sub>+_b_}, where
16
- _b_ is the \"middle\" element on the previous row.\n\nBy applying this \"rule\"
17
- we would expect the optimum set for _n_ = 6 to be A = {11, 17, 20, 22, 23, 24},
18
- with S(A) = 117. However, this is not the optimum set, as we have merely applied
19
- an algorithm to provide a near optimum set. The optimum set for _n_ = 6 is A = {11,
20
- 18, 19, 20, 22, 25}, with S(A) = 115 and corresponding set string: 111819202225.\n\nGiven
21
- that A is an optimum special sum set for _n_ = 7, find its set string.\n\nNOTE:
22
- This problem is related to [Problem 105](problem=105) and [Problem 106](problem=106).\n\n"
7
+ properties are true:\n\n1. S(B) ![≠]({{ images_dir }}/symbol_ne.gif) S(C); that
8
+ is, sums of subsets cannot be equal.\n2. If B contains more elements than C then
9
+ S(B) ![>]({{ images_dir }}/symbol_gt.gif) S(C).\n\nIf S(A) is minimised for a given
10
+ _n_, we shall call it an optimum special sum set. The first five optimum special
11
+ sum sets are given below.\n\n_n_ = 1: {1} \n_n_ = 2: {1, 2} \n_n_ = 3: {2, 3,
12
+ 4} \n_n_ = 4: {3, 5, 6, 7} \n_n_ = 5: {6, 9, 11, 12, 13}\n\nIt _seems_ that for
13
+ a given optimum set, A = {_a_<sub>1</sub>, _a_<sub>2</sub>, ... , _a_<sub>n</sub>},
14
+ the next optimum set is of the form B = {_b_, _a_<sub>1</sub>+_b_, _a_<sub>2</sub>+_b_,
15
+ ... ,_a_<sub>n</sub>+_b_}, where _b_ is the \"middle\" element on the previous row.\n\nBy
16
+ applying this \"rule\" we would expect the optimum set for _n_ = 6 to be A = {11,
17
+ 17, 20, 22, 23, 24}, with S(A) = 117. However, this is not the optimum set, as we
18
+ have merely applied an algorithm to provide a near optimum set. The optimum set
19
+ for _n_ = 6 is A = {11, 18, 19, 20, 22, 25}, with S(A) = 115 and corresponding set
20
+ string: 111819202225.\n\nGiven that A is an optimum special sum set for _n_ = 7,
21
+ find its set string.\n\nNOTE: This problem is related to [Problem 105](problem=105)
22
+ and [Problem 106](problem=106).\n\n"
@@ -5,8 +5,8 @@
5
5
  :content: |+
6
6
  Let S(A) represent the sum of elements in set A of size _n_. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:
7
7
 
8
- 1. S(B) ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif) S(C); that is, sums of subsets cannot be equal.
9
- 2. If B contains more elements than C then S(B) ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) S(C).
8
+ 1. S(B) ![≠]({{ images_dir }}/symbol_ne.gif) S(C); that is, sums of subsets cannot be equal.
9
+ 2. If B contains more elements than C then S(B) ![>]({{ images_dir }}/symbol_gt.gif) S(C).
10
10
 
11
11
  For example, {81, 88, 75, 42, 87, 84, 86, 65} is not a special sum set because 65 + 87 + 88 = 75 + 81 + 84, whereas {157, 150, 164, 119, 79, 159, 161, 139, 158} satisfies both rules for all possible subset pair combinations and S(A) = 1286.
12
12
 
@@ -5,8 +5,8 @@
5
5
  :content: |+
6
6
  Let S(A) represent the sum of elements in set A of size _n_. We shall call it a special sum set if for any two non-empty disjoint subsets, B and C, the following properties are true:
7
7
 
8
- 1. S(B) ![≠](/home/will/src/euler-manager/config/../data/images/symbol_ne.gif) S(C); that is, sums of subsets cannot be equal.
9
- 2. If B contains more elements than C then S(B) ![>](/home/will/src/euler-manager/config/../data/images/symbol_gt.gif) S(C).
8
+ 1. S(B) ![≠]({{ images_dir }}/symbol_ne.gif) S(C); that is, sums of subsets cannot be equal.
9
+ 2. If B contains more elements than C then S(B) ![>]({{ images_dir }}/symbol_gt.gif) S(C).
10
10
 
11
11
  For this problem we shall assume that a given set contains _n_ strictly increasing elements and it already satisfies the second rule.
12
12
 
@@ -3,18 +3,18 @@
3
3
  :name: Minimal network
4
4
  :url: http://projecteuler.net/problem=107
5
5
  :content: "The following undirected network consists of seven vertices and twelve
6
- edges with a total weight of 243.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_107_1.gif)
7
- \ \n\nThe same network can be represented by the matrix below.\n\n|      | **A**
8
- | **B** | **C** | **D** | **E** | **F** | **G** |\n| **A** | - | 16 | 12 | 21 |
9
- - | - | - |\n| **B** | 16 | - | - | 17 | 20 | - | - |\n| **C** | 12 | - | - | 28
10
- | - | 31 | - |\n| **D** | 21 | 17 | 28 | - | 18 | 19 | 23 |\n| **E** | - | 20 |
11
- - | 18 | - | - | 11 |\n| **F** | - | - | 31 | 19 | - | - | 27 |\n| **G** | - | -
12
- | - | 23 | 11 | 27 | - |\n\nHowever, it is possible to optimise the network by removing
13
- some edges and still ensure that all points on the network remain connected. The
14
- network which achieves the maximum saving is shown below. It has a weight of 93,
15
- representing a saving of 243 ![−](/home/will/src/euler-manager/config/../data/images/symbol_minus.gif)
16
- 93 = 150 from the original network.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_107_2.gif)
17
- \ \n\nUsing [network.txt](project/network.txt) (right click and 'Save Link/Target
18
- As...'), a 6K text file containing a network with forty vertices, and given in matrix
19
- form, find the maximum saving which can be achieved by removing redundant edges
20
- whilst ensuring that the network remains connected.\n\n"
6
+ edges with a total weight of 243.\n\n ![]({{ images_dir }}/p_107_1.gif) \n\nThe
7
+ same network can be represented by the matrix below.\n\n|      | **A** | **B** |
8
+ **C** | **D** | **E** | **F** | **G** |\n| **A** | - | 16 | 12 | 21 | - | - | -
9
+ |\n| **B** | 16 | - | - | 17 | 20 | - | - |\n| **C** | 12 | - | - | 28 | - | 31
10
+ | - |\n| **D** | 21 | 17 | 28 | - | 18 | 19 | 23 |\n| **E** | - | 20 | - | 18 |
11
+ - | - | 11 |\n| **F** | - | - | 31 | 19 | - | - | 27 |\n| **G** | - | - | - | 23
12
+ | 11 | 27 | - |\n\nHowever, it is possible to optimise the network by removing some
13
+ edges and still ensure that all points on the network remain connected. The network
14
+ which achieves the maximum saving is shown below. It has a weight of 93, representing
15
+ a saving of 243 ![−]({{ images_dir }}/symbol_minus.gif) 93 = 150 from the original
16
+ network.\n\n ![]({{ images_dir }}/p_107_2.gif) \n\nUsing [network.txt](project/network.txt)
17
+ (right click and 'Save Link/Target As...'), a 6K text file containing a network
18
+ with forty vertices, and given in matrix form, find the maximum saving which can
19
+ be achieved by removing redundant edges whilst ensuring that the network remains
20
+ connected.\n\n"
@@ -3,19 +3,16 @@
3
3
  :name: Diophantine reciprocals I
4
4
  :url: http://projecteuler.net/problem=108
5
5
  :content: "In the following equation <var>x</var>, <var>y</var>, and <var>n</var>
6
- are positive integers.\n\n| \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
7
- \ \n <var>x</var>\n | + | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
8
- \ \n <var>y</var>\n | = | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
9
- \ \n <var>n</var>\n |\n\nFor <var>n</var> = 4 there are exactly three distinct solutions:\n\n|
10
- \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif) \n
11
- 5\n | + | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
12
- \ \n 20\n | = | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
13
- \ \n 4\n |\n| \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
14
- \ \n 6\n | + | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
15
- \ \n 12\n | = | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
16
- \ \n 4\n |\n| \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
17
- \ \n 8\n | + | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
18
- \ \n 8\n | = | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
19
- \ \n 4\n |\n\nWhat is the least value of <var>n</var> for which the number of distinct
20
- solutions exceeds one-thousand?\n\nNOTE: This problem is an easier version of [Problem
21
- 110](problem=110); it is strongly advised that you solve this one first.\n\n"
6
+ are positive integers.\n\n| \n1 \n ![]({{ images_dir }}/blackdot.gif) \n <var>x</var>\n
7
+ | + | \n1 \n ![]({{ images_dir }}/blackdot.gif) \n <var>y</var>\n | = | \n1 \n
8
+ ![]({{ images_dir }}/blackdot.gif) \n <var>n</var>\n |\n\nFor <var>n</var> = 4
9
+ there are exactly three distinct solutions:\n\n| \n1 \n ![]({{ images_dir }}/blackdot.gif)
10
+ \ \n 5\n | + | \n1 \n ![]({{ images_dir }}/blackdot.gif) \n 20\n | = | \n1 \n
11
+ ![]({{ images_dir }}/blackdot.gif) \n 4\n |\n| \n1 \n ![]({{ images_dir }}/blackdot.gif)
12
+ \ \n 6\n | + | \n1 \n ![]({{ images_dir }}/blackdot.gif) \n 12\n | = | \n1 \n
13
+ ![]({{ images_dir }}/blackdot.gif) \n 4\n |\n| \n1 \n ![]({{ images_dir }}/blackdot.gif)
14
+ \ \n 8\n | + | \n1 \n ![]({{ images_dir }}/blackdot.gif) \n 8\n | = | \n1 \n
15
+ ![]({{ images_dir }}/blackdot.gif) \n 4\n |\n\nWhat is the least value of <var>n</var>
16
+ for which the number of distinct solutions exceeds one-thousand?\n\nNOTE: This problem
17
+ is an easier version of [Problem 110](problem=110); it is strongly advised that
18
+ you solve this one first.\n\n"
@@ -3,12 +3,12 @@
3
3
  :name: Darts
4
4
  :url: http://projecteuler.net/problem=109
5
5
  :content: "In the game of darts a player throws three darts at a target board which
6
- is split into twenty equal sized sections numbered one to twenty.\n\n ![](/home/will/src/euler-manager/config/../data/images/p_109.gif)
7
- \ \n\nThe score of a dart is determined by the number of the region that the dart
8
- lands in. A dart landing outside the red/green outer ring scores zero. The black
9
- and cream regions inside this ring represent single scores. However, the red/green
10
- outer ring and middle ring score double and treble scores respectively.\n\nAt the
11
- centre of the board are two concentric circles called the bull region, or bulls-eye.
6
+ is split into twenty equal sized sections numbered one to twenty.\n\n ![]({{ images_dir
7
+ }}/p_109.gif) \n\nThe score of a dart is determined by the number of the region
8
+ that the dart lands in. A dart landing outside the red/green outer ring scores zero.
9
+ The black and cream regions inside this ring represent single scores. However, the
10
+ red/green outer ring and middle ring score double and treble scores respectively.\n\nAt
11
+ the centre of the board are two concentric circles called the bull region, or bulls-eye.
12
12
  The outer bull is worth 25 points and the inner bull is a double, worth 50 points.\n\nThere
13
13
  are many variations of rules but in the most popular game the players will begin
14
14
  with a score 301 or 501 and the first player to reduce their running total to zero
@@ -18,14 +18,13 @@
18
18
  running total to one or lower means the score for that set of three darts is \"bust\".\n\nWhen
19
19
  a player is able to finish on their current score it is called a \"checkout\" and
20
20
  the highest checkout is 170: T20 T20 D25 (two treble 20s and double bull).\n\nThere
21
- are exactly eleven distinct ways to checkout on a score of 6:\n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
22
- \ \nD3 | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) \n 
23
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) \n  |\n| D1
24
- | D2 |   |\n| S2 | D2 |   |\n| D2 | D1 |   |\n| S4 | D1 |   |\n| S1 | S1 | D2 |\n|
25
- S1 | T1 | D1 |\n| S1 | S3 | D1 |\n| D1 | D1 | D1 |\n| D1 | S2 | D1 |\n| S2 | S2
26
- | D1 |\n\nNote that D1 D2 is considered **different** to D2 D1 as they finish on
27
- different doubles. However, the combination S1 T1 D1 is considered the **same**
28
- as T1 S1 D1.\n\nIn addition we shall not include misses in considering combinations;
29
- for example, D3 is the **same** as 0 D3 and 0 0 D3.\n\nIncredibly there are 42336
30
- distinct ways of checking out in total.\n\nHow many distinct ways can a player checkout
31
- with a score less than 100?\n\n"
21
+ are exactly eleven distinct ways to checkout on a score of 6:\n\n| ![]({{ images_dir
22
+ }}/spacer.gif) \nD3 | ![]({{ images_dir }}/spacer.gif) \n  | ![]({{ images_dir
23
+ }}/spacer.gif) \n  |\n| D1 | D2 |   |\n| S2 | D2 |   |\n| D2 | D1 |   |\n| S4 |
24
+ D1 |   |\n| S1 | S1 | D2 |\n| S1 | T1 | D1 |\n| S1 | S3 | D1 |\n| D1 | D1 | D1 |\n|
25
+ D1 | S2 | D1 |\n| S2 | S2 | D1 |\n\nNote that D1 D2 is considered **different**
26
+ to D2 D1 as they finish on different doubles. However, the combination S1 T1 D1
27
+ is considered the **same** as T1 S1 D1.\n\nIn addition we shall not include misses
28
+ in considering combinations; for example, D3 is the **same** as 0 D3 and 0 0 D3.\n\nIncredibly
29
+ there are 42336 distinct ways of checking out in total.\n\nHow many distinct ways
30
+ can a player checkout with a score less than 100?\n\n"
data/data/problems/11.yml CHANGED
@@ -2,27 +2,26 @@
2
2
  :id: 11
3
3
  :name: Largest product in a grid
4
4
  :url: http://projecteuler.net/problem=11
5
- :content: "In the 20 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)20
6
- grid below, four numbers along a diagonal line have been marked in red.\n\n08 02
7
- 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 \n\r49 49 99 40 17 81 18
8
- 57 60 87 17 40 98 43 69 48 04 56 62 00 \n\r81 49 31 73 55 79 14 29 93 71 40 67
9
- 53 88 30 03 49 13 36 65 \n\r52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37
10
- 02 36 91 \n\r22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 \n\r24
11
- 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 \n\r32 98 81 28 64 23
12
- 67 10 **26** 38 40 67 59 54 70 66 18 38 64 70 \n\r67 26 20 68 02 62 12 20 95 **63**
13
- 94 39 63 08 40 91 66 49 94 21 \n\r24 55 58 05 66 73 99 26 97 17 **78** 78 96 83
14
- 14 88 34 89 63 72 \n\r21 36 23 09 75 00 76 44 20 45 35 **14** 00 61 33 97 34 31
15
- 33 95 \n\r78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 \n\r16 39
16
- 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 \n\r86 56 00 48 35 71 89
17
- 07 05 44 44 37 44 60 21 58 51 54 17 58 \n\r19 80 81 68 05 94 47 69 28 73 92 13
18
- 86 52 17 77 04 89 55 40 \n\r04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33
19
- 27 98 66 \n\r88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 \n\r04
20
- 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 \n\r20 69 36 41 72 30
21
- 23 88 34 62 99 69 82 67 59 85 74 04 36 16 \n\r20 73 35 29 78 31 90 01 74 31 49
22
- 71 48 86 81 16 23 57 05 54 \n\r01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01
23
- 89 19 67 48\n\nThe product of these numbers is 26 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)
24
- 63 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 78
25
- ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif) 14 = 1788696.\n\nWhat
26
- is the greatest product of four adjacent numbers in the same direction (up, down,
27
- left, right, or diagonally) in the 20 ![×](/home/will/src/euler-manager/config/../data/images/symbol_times.gif)20
5
+ :content: "In the 20 ![×]({{ images_dir }}/symbol_times.gif)20 grid below, four numbers
6
+ along a diagonal line have been marked in red.\n\n08 02 22 97 38 15 00 40 00 75
7
+ 04 05 07 78 52 12 50 77 91 08 \n\r49 49 99 40 17 81 18 57 60 87 17 40 98 43 69
8
+ 48 04 56 62 00 \n\r81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
9
+ \ \n\r52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 \n\r22 31 16
10
+ 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 \n\r24 47 32 60 99 03 45 02
11
+ 44 75 33 53 78 36 84 20 35 17 12 50 \n\r32 98 81 28 64 23 67 10 **26** 38 40 67
12
+ 59 54 70 66 18 38 64 70 \n\r67 26 20 68 02 62 12 20 95 **63** 94 39 63 08 40 91
13
+ 66 49 94 21 \n\r24 55 58 05 66 73 99 26 97 17 **78** 78 96 83 14 88 34 89 63 72
14
+ \ \n\r21 36 23 09 75 00 76 44 20 45 35 **14** 00 61 33 97 34 31 33 95 \n\r78 17
15
+ 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 \n\r16 39 05 42 96 35 31
16
+ 47 55 58 88 24 00 17 54 24 36 29 85 57 \n\r86 56 00 48 35 71 89 07 05 44 44 37
17
+ 44 60 21 58 51 54 17 58 \n\r19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04
18
+ 89 55 40 \n\r04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 \n\r88
19
+ 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 \n\r04 42 16 73 38 25
20
+ 39 11 24 94 72 18 08 46 29 32 40 62 76 36 \n\r20 69 36 41 72 30 23 88 34 62 99
21
+ 69 82 67 59 85 74 04 36 16 \n\r20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16
22
+ 23 57 05 54 \n\r01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48\n\nThe
23
+ product of these numbers is 26 ![×]({{ images_dir }}/symbol_times.gif) 63 ![×]({{
24
+ images_dir }}/symbol_times.gif) 78 ![×]({{ images_dir }}/symbol_times.gif) 14 =
25
+ 1788696.\n\nWhat is the greatest product of four adjacent numbers in the same direction
26
+ (up, down, left, right, or diagonally) in the 20 ![×]({{ images_dir }}/symbol_times.gif)20
28
27
  grid?\n\n"
@@ -3,13 +3,12 @@
3
3
  :name: Diophantine reciprocals II
4
4
  :url: http://projecteuler.net/problem=110
5
5
  :content: "In the following equation <var>x</var>, <var>y</var>, and <var>n</var>
6
- are positive integers.\n\n| \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
7
- \ \n <var>x</var>\n | + | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
8
- \ \n <var>y</var>\n | = | \n1 \n ![](/home/will/src/euler-manager/config/../data/images/blackdot.gif)
9
- \ \n <var>n</var>\n |\n\nIt can be verified that when <var>n</var> = 1260 there
10
- are 113 distinct solutions and this is the least value of <var>n</var> for which
11
- the total number of distinct solutions exceeds one hundred.\n\nWhat is the least
12
- value of <var>n</var> for which the number of distinct solutions exceeds four million?\n\nNOTE:
13
- This problem is a much more difficult version of [Problem 108](problem=108) and
14
- as it is well beyond the limitations of a brute force approach it requires a clever
15
- implementation.\n\n"
6
+ are positive integers.\n\n| \n1 \n ![]({{ images_dir }}/blackdot.gif) \n <var>x</var>\n
7
+ | + | \n1 \n ![]({{ images_dir }}/blackdot.gif) \n <var>y</var>\n | = | \n1 \n
8
+ ![]({{ images_dir }}/blackdot.gif) \n <var>n</var>\n |\n\nIt can be verified that
9
+ when <var>n</var> = 1260 there are 113 distinct solutions and this is the least
10
+ value of <var>n</var> for which the total number of distinct solutions exceeds one
11
+ hundred.\n\nWhat is the least value of <var>n</var> for which the number of distinct
12
+ solutions exceeds four million?\n\nNOTE: This problem is a much more difficult version
13
+ of [Problem 108](problem=108) and as it is well beyond the limitations of a brute
14
+ force approach it requires a clever implementation.\n\n"
@@ -5,47 +5,36 @@
5
5
  :content: "A row measuring seven units in length has red blocks with a minimum length
6
6
  of three units placed on it, such that any two red blocks (which are allowed to
7
7
  be different lengths) are separated by at least one black square. There are exactly
8
- seventeen ways of doing this.\n\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
9
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
10
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
11
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
12
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
13
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
14
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
15
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
16
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
17
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
18
- |\n\n |\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
19
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
20
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
21
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
22
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
23
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
24
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
25
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
26
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
27
- |\n\n |\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
28
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
29
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
30
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
31
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
32
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
33
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
34
- |\n\n |\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
35
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
36
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
37
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
38
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
39
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
40
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
41
- |\n\n |\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
42
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
43
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
44
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
45
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
46
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n |\n|
47
- \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
48
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
8
+ seventeen ways of doing this.\n\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{
9
+ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
10
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
11
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
12
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
13
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir
14
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
15
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n |\n|
16
+ \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{
17
+ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
18
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
19
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
20
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
21
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
22
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n |\n| \n\n| ![]({{ images_dir
23
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
24
+ |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
25
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n|
26
+ ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
27
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n |\n| \n\n| ![]({{ images_dir
28
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
29
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
30
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
31
+ }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
32
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n |\n| \n\n| ![]({{ images_dir
33
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
34
+ |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
35
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
36
+ | ![]({{ images_dir }}/spacer.gif) |\n\n |\n| \n\n| ![]({{ images_dir }}/spacer.gif)
37
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
49
38
  |\n\n |   |\n\nHow many ways can a row measuring fifty units in length be filled?\n\nNOTE:
50
39
  Although the example above does not lend itself to the possibility, in general it
51
40
  is permitted to mix block sizes. For example, on a row measuring eight units in
@@ -5,31 +5,25 @@
5
5
  :content: "A row of five black square tiles is to have a number of its tiles replaced
6
6
  with coloured oblong tiles chosen from red (length two), green (length three), or
7
7
  blue (length four).\n\nIf red tiles are chosen there are exactly seven ways this
8
- can be done.\n\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
9
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
10
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
11
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
12
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
13
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
14
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
15
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
16
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
17
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
18
- |\n\n |\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
19
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
20
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
21
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
22
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
23
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
24
- |\n\n |   |\n\nIf green tiles are chosen there are three ways.\n\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
25
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
26
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
27
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
28
- |\n\n | \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
29
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
30
- |\n\n |   |\n\nAnd if blue tiles are chosen there are two ways.\n\n| \n\n| ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
31
- | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) |\n\n | \n\n|
32
- ![](/home/will/src/euler-manager/config/../data/images/spacer.gif) | ![](/home/will/src/euler-manager/config/../data/images/spacer.gif)
8
+ can be done.\n\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
9
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n|
10
+ ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
11
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir
12
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
13
+ | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif)
14
+ | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
15
+ }}/spacer.gif) |\n\n |\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
16
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir
17
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
18
+ |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
19
+ | ![]({{ images_dir }}/spacer.gif) |\n\n |   |\n\nIf green tiles are chosen there
20
+ are three ways.\n\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir
21
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) |\n\n | \n\n| ![]({{ images_dir
22
+ }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
23
+ |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
24
+ | ![]({{ images_dir }}/spacer.gif) |\n\n |   |\n\nAnd if blue tiles are chosen there
25
+ are two ways.\n\n| \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
26
+ |\n\n | \n\n| ![]({{ images_dir }}/spacer.gif) | ![]({{ images_dir }}/spacer.gif)
33
27
  |\n\n |\n\nAssuming that colours cannot be mixed there are 7 + 3 + 2 = 12 ways of
34
28
  replacing the black tiles in a row measuring five units in length.\n\nHow many different
35
29
  ways can the black tiles in a row measuring fifty units in length be replaced if