euler-manager 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +37 -0
- data/Rakefile +1 -0
- data/bin/euler +145 -0
- data/data/answers.yml +456 -0
- data/data/problems/1.yml +7 -0
- data/data/problems/10.yml +8 -0
- data/data/problems/100.yml +13 -0
- data/data/problems/101.yml +49 -0
- data/data/problems/102.yml +16 -0
- data/data/problems/103.yml +26 -0
- data/data/problems/104.yml +15 -0
- data/data/problems/105.yml +21 -0
- data/data/problems/106.yml +19 -0
- data/data/problems/107.yml +20 -0
- data/data/problems/108.yml +32 -0
- data/data/problems/109.yml +33 -0
- data/data/problems/11.yml +33 -0
- data/data/problems/110.yml +19 -0
- data/data/problems/111.yml +21 -0
- data/data/problems/112.yml +15 -0
- data/data/problems/113.yml +13 -0
- data/data/problems/114.yml +106 -0
- data/data/problems/115.yml +17 -0
- data/data/problems/116.yml +76 -0
- data/data/problems/117.yml +82 -0
- data/data/problems/118.yml +9 -0
- data/data/problems/119.yml +11 -0
- data/data/problems/12.yml +13 -0
- data/data/problems/120.yml +17 -0
- data/data/problems/121.yml +15 -0
- data/data/problems/122.yml +42 -0
- data/data/problems/123.yml +13 -0
- data/data/problems/124.yml +58 -0
- data/data/problems/125.yml +12 -0
- data/data/problems/126.yml +17 -0
- data/data/problems/127.yml +31 -0
- data/data/problems/128.yml +18 -0
- data/data/problems/129.yml +12 -0
- data/data/problems/13.yml +6 -0
- data/data/problems/130.yml +19 -0
- data/data/problems/131.yml +12 -0
- data/data/problems/132.yml +12 -0
- data/data/problems/133.yml +13 -0
- data/data/problems/134.yml +19 -0
- data/data/problems/135.yml +20 -0
- data/data/problems/136.yml +17 -0
- data/data/problems/137.yml +36 -0
- data/data/problems/138.yml +20 -0
- data/data/problems/139.yml +15 -0
- data/data/problems/14.yml +28 -0
- data/data/problems/140.yml +29 -0
- data/data/problems/141.yml +14 -0
- data/data/problems/142.yml +14 -0
- data/data/problems/143.yml +20 -0
- data/data/problems/144.yml +30 -0
- data/data/problems/145.yml +11 -0
- data/data/problems/146.yml +9 -0
- data/data/problems/147.yml +14 -0
- data/data/problems/148.yml +11 -0
- data/data/problems/149.yml +41 -0
- data/data/problems/15.yml +11 -0
- data/data/problems/150.yml +34 -0
- data/data/problems/151.yml +19 -0
- data/data/problems/152.yml +12 -0
- data/data/problems/153.yml +57 -0
- data/data/problems/154.yml +16 -0
- data/data/problems/155.yml +22 -0
- data/data/problems/156.yml +27 -0
- data/data/problems/157.yml +34 -0
- data/data/problems/158.yml +19 -0
- data/data/problems/159.yml +29 -0
- data/data/problems/16.yml +6 -0
- data/data/problems/160.yml +8 -0
- data/data/problems/161.yml +15 -0
- data/data/problems/162.yml +15 -0
- data/data/problems/163.yml +19 -0
- data/data/problems/164.yml +8 -0
- data/data/problems/165.yml +32 -0
- data/data/problems/166.yml +15 -0
- data/data/problems/167.yml +17 -0
- data/data/problems/168.yml +13 -0
- data/data/problems/169.yml +10 -0
- data/data/problems/17.yml +11 -0
- data/data/problems/170.yml +16 -0
- data/data/problems/171.yml +13 -0
- data/data/problems/172.yml +6 -0
- data/data/problems/173.yml +12 -0
- data/data/problems/174.yml +20 -0
- data/data/problems/175.yml +21 -0
- data/data/problems/176.yml +9 -0
- data/data/problems/177.yml +16 -0
- data/data/problems/178.yml +9 -0
- data/data/problems/179.yml +10 -0
- data/data/problems/18.yml +21 -0
- data/data/problems/180.yml +34 -0
- data/data/problems/181.yml +7 -0
- data/data/problems/182.yml +35 -0
- data/data/problems/183.yml +27 -0
- data/data/problems/184.yml +18 -0
- data/data/problems/185.yml +22 -0
- data/data/problems/186.yml +28 -0
- data/data/problems/187.yml +16 -0
- data/data/problems/188.yml +10 -0
- data/data/problems/189.yml +15 -0
- data/data/problems/19.yml +12 -0
- data/data/problems/190.yml +13 -0
- data/data/problems/191.yml +15 -0
- data/data/problems/192.yml +27 -0
- data/data/problems/193.yml +7 -0
- data/data/problems/194.yml +18 -0
- data/data/problems/195.yml +13 -0
- data/data/problems/196.yml +25 -0
- data/data/problems/197.yml +16 -0
- data/data/problems/198.yml +21 -0
- data/data/problems/199.yml +14 -0
- data/data/problems/2.yml +10 -0
- data/data/problems/20.yml +22 -0
- data/data/problems/200.yml +12 -0
- data/data/problems/201.yml +20 -0
- data/data/problems/202.yml +14 -0
- data/data/problems/203.yml +21 -0
- data/data/problems/204.yml +11 -0
- data/data/problems/205.yml +10 -0
- data/data/problems/206.yml +6 -0
- data/data/problems/207.yml +20 -0
- data/data/problems/208.yml +12 -0
- data/data/problems/209.yml +27 -0
- data/data/problems/21.yml +13 -0
- data/data/problems/210.yml +10 -0
- data/data/problems/211.yml +11 -0
- data/data/problems/212.yml +41 -0
- data/data/problems/213.yml +11 -0
- data/data/problems/214.yml +15 -0
- data/data/problems/215.yml +18 -0
- data/data/problems/216.yml +14 -0
- data/data/problems/217.yml +27 -0
- data/data/problems/218.yml +14 -0
- data/data/problems/219.yml +19 -0
- data/data/problems/22.yml +13 -0
- data/data/problems/220.yml +24 -0
- data/data/problems/221.yml +20 -0
- data/data/problems/222.yml +7 -0
- data/data/problems/223.yml +12 -0
- data/data/problems/224.yml +12 -0
- data/data/problems/225.yml +11 -0
- data/data/problems/226.yml +16 -0
- data/data/problems/227.yml +13 -0
- data/data/problems/228.yml +23 -0
- data/data/problems/229.yml +30 -0
- data/data/problems/23.yml +19 -0
- data/data/problems/230.yml +23 -0
- data/data/problems/231.yml +16 -0
- data/data/problems/232.yml +14 -0
- data/data/problems/233.yml +10 -0
- data/data/problems/234.yml +23 -0
- data/data/problems/235.yml +9 -0
- data/data/problems/236.yml +32 -0
- data/data/problems/237.yml +13 -0
- data/data/problems/238.yml +42 -0
- data/data/problems/239.yml +9 -0
- data/data/problems/24.yml +10 -0
- data/data/problems/240.yml +11 -0
- data/data/problems/241.yml +17 -0
- data/data/problems/242.yml +16 -0
- data/data/problems/243.yml +19 -0
- data/data/problems/244.yml +32 -0
- data/data/problems/245.yml +36 -0
- data/data/problems/246.yml +17 -0
- data/data/problems/247.yml +21 -0
- data/data/problems/248.yml +6 -0
- data/data/problems/249.yml +7 -0
- data/data/problems/25.yml +15 -0
- data/data/problems/250.yml +7 -0
- data/data/problems/251.yml +13 -0
- data/data/problems/252.yml +31 -0
- data/data/problems/253.yml +36 -0
- data/data/problems/254.yml +21 -0
- data/data/problems/255.yml +59 -0
- data/data/problems/256.yml +43 -0
- data/data/problems/257.yml +18 -0
- data/data/problems/258.yml +13 -0
- data/data/problems/259.yml +16 -0
- data/data/problems/26.yml +11 -0
- data/data/problems/260.yml +30 -0
- data/data/problems/261.yml +19 -0
- data/data/problems/262.yml +20 -0
- data/data/problems/263.yml +19 -0
- data/data/problems/264.yml +20 -0
- data/data/problems/265.yml +16 -0
- data/data/problems/266.yml +10 -0
- data/data/problems/267.yml +14 -0
- data/data/problems/268.yml +8 -0
- data/data/problems/269.yml +15 -0
- data/data/problems/27.yml +25 -0
- data/data/problems/270.yml +17 -0
- data/data/problems/271.yml +13 -0
- data/data/problems/272.yml +15 -0
- data/data/problems/273.yml +21 -0
- data/data/problems/274.yml +23 -0
- data/data/problems/275.yml +19 -0
- data/data/problems/276.yml +11 -0
- data/data/problems/277.yml +24 -0
- data/data/problems/278.yml +32 -0
- data/data/problems/279.yml +6 -0
- data/data/problems/28.yml +17 -0
- data/data/problems/280.yml +13 -0
- data/data/problems/281.yml +17 -0
- data/data/problems/282.yml +10 -0
- data/data/problems/283.yml +11 -0
- data/data/problems/284.yml +22 -0
- data/data/problems/285.yml +17 -0
- data/data/problems/286.yml +12 -0
- data/data/problems/287.yml +36 -0
- data/data/problems/288.yml +15 -0
- data/data/problems/289.yml +19 -0
- data/data/problems/29.yml +24 -0
- data/data/problems/290.yml +8 -0
- data/data/problems/291.yml +10 -0
- data/data/problems/292.yml +13 -0
- data/data/problems/293.yml +15 -0
- data/data/problems/294.yml +10 -0
- data/data/problems/295.yml +26 -0
- data/data/problems/296.yml +15 -0
- data/data/problems/297.yml +19 -0
- data/data/problems/298.yml +46 -0
- data/data/problems/299.yml +31 -0
- data/data/problems/3.yml +7 -0
- data/data/problems/30.yml +12 -0
- data/data/problems/300.yml +24 -0
- data/data/problems/301.yml +25 -0
- data/data/problems/302.yml +18 -0
- data/data/problems/303.yml +11 -0
- data/data/problems/304.yml +19 -0
- data/data/problems/305.yml +14 -0
- data/data/problems/306.yml +29 -0
- data/data/problems/307.yml +12 -0
- data/data/problems/308.yml +34 -0
- data/data/problems/309.yml +17 -0
- data/data/problems/31.yml +18 -0
- data/data/problems/310.yml +19 -0
- data/data/problems/311.yml +21 -0
- data/data/problems/312.yml +15 -0
- data/data/problems/313.yml +17 -0
- data/data/problems/314.yml +29 -0
- data/data/problems/315.yml +49 -0
- data/data/problems/316.yml +25 -0
- data/data/problems/317.yml +11 -0
- data/data/problems/318.yml +61 -0
- data/data/problems/319.yml +23 -0
- data/data/problems/32.yml +14 -0
- data/data/problems/320.yml +12 -0
- data/data/problems/321.yml +18 -0
- data/data/problems/322.yml +12 -0
- data/data/problems/323.yml +19 -0
- data/data/problems/324.yml +17 -0
- data/data/problems/325.yml +25 -0
- data/data/problems/326.yml +12 -0
- data/data/problems/327.yml +39 -0
- data/data/problems/328.yml +36 -0
- data/data/problems/329.yml +17 -0
- data/data/problems/33.yml +13 -0
- data/data/problems/330.yml +40 -0
- data/data/problems/331.yml +28 -0
- data/data/problems/332.yml +16 -0
- data/data/problems/333.yml +25 -0
- data/data/problems/334.yml +39 -0
- data/data/problems/335.yml +16 -0
- data/data/problems/336.yml +24 -0
- data/data/problems/337.yml +15 -0
- data/data/problems/338.yml +41 -0
- data/data/problems/339.yml +17 -0
- data/data/problems/34.yml +7 -0
- data/data/problems/340.yml +14 -0
- data/data/problems/341.yml +18 -0
- data/data/problems/342.yml +17 -0
- data/data/problems/343.yml +29 -0
- data/data/problems/344.yml +21 -0
- data/data/problems/345.yml +26 -0
- data/data/problems/346.yml +11 -0
- data/data/problems/347.yml +16 -0
- data/data/problems/348.yml +12 -0
- data/data/problems/349.yml +13 -0
- data/data/problems/35.yml +8 -0
- data/data/problems/350.yml +18 -0
- data/data/problems/351.yml +13 -0
- data/data/problems/352.yml +49 -0
- data/data/problems/353.yml +25 -0
- data/data/problems/354.yml +16 -0
- data/data/problems/355.yml +8 -0
- data/data/problems/356.yml +10 -0
- data/data/problems/357.yml +9 -0
- data/data/problems/358.yml +31 -0
- data/data/problems/359.yml +26 -0
- data/data/problems/36.yml +8 -0
- data/data/problems/360.yml +12 -0
- data/data/problems/361.yml +20 -0
- data/data/problems/362.yml +32 -0
- data/data/problems/363.yml +33 -0
- data/data/problems/364.yml +15 -0
- data/data/problems/365.yml +17 -0
- data/data/problems/366.yml +26 -0
- data/data/problems/367.yml +20 -0
- data/data/problems/368.yml +39 -0
- data/data/problems/369.yml +15 -0
- data/data/problems/37.yml +10 -0
- data/data/problems/370.yml +16 -0
- data/data/problems/371.yml +13 -0
- data/data/problems/372.yml +16 -0
- data/data/problems/373.yml +10 -0
- data/data/problems/374.yml +25 -0
- data/data/problems/375.yml +23 -0
- data/data/problems/376.yml +25 -0
- data/data/problems/377.yml +11 -0
- data/data/problems/378.yml +15 -0
- data/data/problems/379.yml +15 -0
- data/data/problems/38.yml +18 -0
- data/data/problems/380.yml +22 -0
- data/data/problems/381.yml +21 -0
- data/data/problems/382.yml +23 -0
- data/data/problems/383.yml +13 -0
- data/data/problems/384.yml +28 -0
- data/data/problems/385.yml +22 -0
- data/data/problems/386.yml +16 -0
- data/data/problems/387.yml +19 -0
- data/data/problems/388.yml +12 -0
- data/data/problems/389.yml +12 -0
- data/data/problems/39.yml +10 -0
- data/data/problems/390.yml +18 -0
- data/data/problems/391.yml +29 -0
- data/data/problems/392.yml +22 -0
- data/data/problems/393.yml +12 -0
- data/data/problems/394.yml +22 -0
- data/data/problems/395.yml +19 -0
- data/data/problems/396.yml +28 -0
- data/data/problems/397.yml +20 -0
- data/data/problems/398.yml +13 -0
- data/data/problems/399.yml +22 -0
- data/data/problems/4.yml +8 -0
- data/data/problems/40.yml +18 -0
- data/data/problems/400.yml +18 -0
- data/data/problems/401.yml +11 -0
- data/data/problems/402.yml +25 -0
- data/data/problems/403.yml +19 -0
- data/data/problems/404.yml +21 -0
- data/data/problems/405.yml +15 -0
- data/data/problems/406.yml +46 -0
- data/data/problems/407.yml +20 -0
- data/data/problems/408.yml +14 -0
- data/data/problems/409.yml +12 -0
- data/data/problems/41.yml +8 -0
- data/data/problems/410.yml +19 -0
- data/data/problems/411.yml +23 -0
- data/data/problems/412.yml +19 -0
- data/data/problems/413.yml +13 -0
- data/data/problems/414.yml +40 -0
- data/data/problems/415.yml +19 -0
- data/data/problems/416.yml +13 -0
- data/data/problems/417.yml +21 -0
- data/data/problems/418.yml +17 -0
- data/data/problems/419.yml +22 -0
- data/data/problems/42.yml +14 -0
- data/data/problems/420.yml +13 -0
- data/data/problems/421.yml +29 -0
- data/data/problems/422.yml +22 -0
- data/data/problems/423.yml +22 -0
- data/data/problems/424.yml +37 -0
- data/data/problems/425.yml +16 -0
- data/data/problems/426.yml +29 -0
- data/data/problems/427.yml +18 -0
- data/data/problems/428.yml +32 -0
- data/data/problems/429.yml +10 -0
- data/data/problems/43.yml +17 -0
- data/data/problems/430.yml +20 -0
- data/data/problems/431.yml +33 -0
- data/data/problems/432.yml +13 -0
- data/data/problems/433.yml +18 -0
- data/data/problems/434.yml +32 -0
- data/data/problems/435.yml +21 -0
- data/data/problems/436.yml +21 -0
- data/data/problems/437.yml +22 -0
- data/data/problems/438.yml +29 -0
- data/data/problems/439.yml +17 -0
- data/data/problems/44.yml +16 -0
- data/data/problems/440.yml +21 -0
- data/data/problems/441.yml +23 -0
- data/data/problems/442.yml +9 -0
- data/data/problems/443.yml +13 -0
- data/data/problems/444.yml +28 -0
- data/data/problems/445.yml +37 -0
- data/data/problems/446.yml +29 -0
- data/data/problems/447.yml +31 -0
- data/data/problems/448.yml +14 -0
- data/data/problems/449.yml +17 -0
- data/data/problems/45.yml +15 -0
- data/data/problems/450.yml +26 -0
- data/data/problems/451.yml +15 -0
- data/data/problems/452.yml +8 -0
- data/data/problems/453.yml +16 -0
- data/data/problems/454.yml +17 -0
- data/data/problems/455.yml +16 -0
- data/data/problems/456.yml +15 -0
- data/data/problems/46.yml +18 -0
- data/data/problems/47.yml +21 -0
- data/data/problems/48.yml +7 -0
- data/data/problems/49.yml +10 -0
- data/data/problems/5.yml +8 -0
- data/data/problems/50.yml +10 -0
- data/data/problems/51.yml +15 -0
- data/data/problems/52.yml +8 -0
- data/data/problems/53.yml +28 -0
- data/data/problems/54.yml +43 -0
- data/data/problems/55.yml +21 -0
- data/data/problems/56.yml +11 -0
- data/data/problems/57.yml +15 -0
- data/data/problems/58.yml +22 -0
- data/data/problems/59.yml +23 -0
- data/data/problems/6.yml +13 -0
- data/data/problems/60.yml +10 -0
- data/data/problems/61.yml +30 -0
- data/data/problems/62.yml +9 -0
- data/data/problems/63.yml +7 -0
- data/data/problems/64.yml +130 -0
- data/data/problems/65.yml +62 -0
- data/data/problems/66.yml +27 -0
- data/data/problems/67.yml +17 -0
- data/data/problems/68.yml +23 -0
- data/data/problems/69.yml +14 -0
- data/data/problems/7.yml +6 -0
- data/data/problems/70.yml +16 -0
- data/data/problems/71.yml +17 -0
- data/data/problems/72.yml +16 -0
- data/data/problems/73.yml +16 -0
- data/data/problems/74.yml +41 -0
- data/data/problems/75.yml +16 -0
- data/data/problems/76.yml +8 -0
- data/data/problems/77.yml +8 -0
- data/data/problems/78.yml +12 -0
- data/data/problems/79.yml +11 -0
- data/data/problems/8.yml +6 -0
- data/data/problems/80.yml +11 -0
- data/data/problems/81.yml +19 -0
- data/data/problems/82.yml +19 -0
- data/data/problems/83.yml +23 -0
- data/data/problems/84.yml +63 -0
- data/data/problems/85.yml +9 -0
- data/data/problems/86.yml +15 -0
- data/data/problems/87.yml +12 -0
- data/data/problems/88.yml +53 -0
- data/data/problems/89.yml +18 -0
- data/data/problems/9.yml +13 -0
- data/data/problems/90.yml +23 -0
- data/data/problems/91.yml +19 -0
- data/data/problems/92.yml +29 -0
- data/data/problems/93.yml +21 -0
- data/data/problems/94.yml +11 -0
- data/data/problems/95.yml +23 -0
- data/data/problems/96.yml +46 -0
- data/data/problems/97.yml +14 -0
- data/data/problems/98.yml +16 -0
- data/data/problems/99.yml +16 -0
- data/euler-manager.gemspec +31 -0
- data/euler-manager.sublime-project +12 -0
- data/example/1/README.md +6 -0
- data/example/1/ruby/1.rb +5 -0
- data/example/1/scala/1.scala +9 -0
- data/example/2/README.md +9 -0
- data/example/2/python/2.py +5 -0
- data/example/2/python/euler.py +0 -0
- data/example/Eulerfile.rb +87 -0
- data/example/README.md +26 -0
- data/example/lib/euler.py +0 -0
- data/example/lib/euler.rb +0 -0
- data/example/lib/euler.scala +5 -0
- data/lib/euler.rb +190 -0
- data/lib/euler/errors.rb +7 -0
- data/lib/euler/languages.rb +12 -0
- data/lib/euler/languages/coffeescript.rb +25 -0
- data/lib/euler/languages/javascript.rb +25 -0
- data/lib/euler/languages/python.rb +27 -0
- data/lib/euler/languages/ruby.rb +25 -0
- data/lib/euler/languages/scala.rb +27 -0
- data/lib/euler/languages/templates/coffeescript.coffee +5 -0
- data/lib/euler/languages/templates/javascript.js +5 -0
- data/lib/euler/languages/templates/python.py +5 -0
- data/lib/euler/languages/templates/ruby.rb +5 -0
- data/lib/euler/languages/templates/scala.scala +9 -0
- data/lib/euler/problem.rb +60 -0
- data/lib/euler/solution.rb +98 -0
- data/lib/euler/version.rb +3 -0
- data/scripts/update_problems +68 -0
- data/spec/euler/problem_spec.rb +5 -0
- data/spec/euler/solution_spec.rb +69 -0
- data/spec/euler_spec.rb +27 -0
- data/spec/spec_helper.rb +3 -0
- metadata +644 -0
data/data/problems/1.yml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
:id: 1
|
3
|
+
:name: Multiples of 3 and 5
|
4
|
+
:url: http://projecteuler.net/problem=1
|
5
|
+
:content: "\r\n<p>If we list all the natural numbers below 10 that are multiples of
|
6
|
+
3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.</p>\r\n<p>Find the
|
7
|
+
sum of all the multiples of 3 or 5 below 1000.</p>\r\n\r\n"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
:id: 10
|
3
|
+
:name: Summation of primes
|
4
|
+
:url: http://projecteuler.net/problem=10
|
5
|
+
:content: "\r\n<p>The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.</p>\r\n<p>Find
|
6
|
+
the sum of all the primes below two million.</p>\r\n<!--\r\n<p class=\"info\">Note:
|
7
|
+
This problem has been changed recently, please check that you are using the right
|
8
|
+
parameters.</p>\r\n-->\r\n\r\n\r\n"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
:id: 100
|
3
|
+
:name: Arranged probability
|
4
|
+
:url: http://projecteuler.net/problem=100
|
5
|
+
:content: "\r\n\n<p>If a box contains twenty-one coloured discs, composed of fifteen
|
6
|
+
blue discs and six red discs, and two discs were taken at random, it can be seen
|
7
|
+
that the probability of taking two blue discs, P(BB) = (15/21)<img src=\"images/symbol_times.gif\"
|
8
|
+
width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">(14/20)
|
9
|
+
= 1/2.</p>\n<p>The next such arrangement, for which there is exactly 50% chance
|
10
|
+
of taking two blue discs at random, is a box containing eighty-five blue discs and
|
11
|
+
thirty-five red discs.</p>\n<p>By finding the first arrangement to contain over
|
12
|
+
10<sup>12</sup> = 1,000,000,000,000 discs in total, determine the number of blue
|
13
|
+
discs that the box would contain.</p>\n\r\n"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
:id: 101
|
3
|
+
:name: Optimum polynomial
|
4
|
+
:url: http://projecteuler.net/problem=101
|
5
|
+
:content: "\r\n<p>If we are presented with the first <var>k</var> terms of a sequence
|
6
|
+
it is impossible to say with certainty the value of the next term, as there are
|
7
|
+
infinitely many polynomial functions that can model the sequence.</p>\r\n<p>As an
|
8
|
+
example, let us consider the sequence of cube numbers. This is defined by the generating
|
9
|
+
function, <br><var>u</var><sub><var>n</var></sub> = <var>n</var><sup>3</sup>: 1,
|
10
|
+
8, 27, 64, 125, 216, ...</p>\r\n<p>Suppose we were only given the first two terms
|
11
|
+
of this sequence. Working on the principle that \"simple is best\" we should assume
|
12
|
+
a linear relationship and predict the next term to be 15 (common difference 7).
|
13
|
+
Even if we were presented with the first three terms, by the same principle of simplicity,
|
14
|
+
a quadratic relationship should be assumed.</p>\r\n<p>We shall define OP(<var>k</var>,
|
15
|
+
<var>n</var>) to be the <var>n</var><sup>th</sup> term of the optimum polynomial
|
16
|
+
generating function for the first <var>k</var> terms of a sequence. It should be
|
17
|
+
clear that OP(<var>k</var>, <var>n</var>) will accurately generate the terms of
|
18
|
+
the sequence for <var>n</var> <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\"
|
19
|
+
alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\"><var>k</var>, and potentially
|
20
|
+
the <i>first incorrect term</i> (FIT) will be OP(<var>k</var>, <var>k</var>+1);
|
21
|
+
in which case we shall call it a <i>bad OP</i> (BOP).</p>\r\n<p>As a basis, if we
|
22
|
+
were only given the first term of sequence, it would be most sensible to assume
|
23
|
+
constancy; that is, for <var>n</var> <img src=\"images/symbol_ge.gif\" width=\"10\"
|
24
|
+
height=\"12\" alt=\"≥\" border=\"0\" style=\"vertical-align:middle;\"> 2, OP(1,
|
25
|
+
<var>n</var>) = <var>u</var><sub>1</sub>.</p>\r\n<p>Hence we obtain the following
|
26
|
+
OPs for the cubic sequence:</p>\r\n<div style=\"margin-left:50px;\">\r\n<table>\n<tr>\n<td>OP(1,
|
27
|
+
<var>n</var>) = 1</td>\r\n<td>1, <span style=\"color:red;\"><b>1</b></span>, 1,
|
28
|
+
1, ...</td>\r\n</tr>\n<tr>\n<td>OP(2, <var>n</var>) = 7<var>n</var><img src=\"images/symbol_minus.gif\"
|
29
|
+
width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">6</td>\r\n<td>1,
|
30
|
+
8, <span style=\"color:red;\"><b>15</b></span>, ...</td>\r\n</tr>\n<tr>\n<td>OP(3,
|
31
|
+
<var>n</var>) = 6<var>n</var><sup>2</sup><img src=\"images/symbol_minus.gif\" width=\"9\"
|
32
|
+
height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">11<var>n</var>+6 </td>\r\n<td>1,
|
33
|
+
8, 27, <span style=\"color:red;\"><b>58</b></span>, ...</td>\r\n</tr>\n<tr>\n<td>OP(4,
|
34
|
+
<var>n</var>) = <var>n</var><sup>3</sup>\n</td>\r\n<td>1, 8, 27, 64, 125, ...</td>\r\n</tr>\n</table>\n</div>\r\n<p>Clearly
|
35
|
+
no BOPs exist for <var>k</var> <img src=\"images/symbol_ge.gif\" width=\"10\" height=\"12\"
|
36
|
+
alt=\"≥\" border=\"0\" style=\"vertical-align:middle;\"> 4.</p>\r\n<p>By considering
|
37
|
+
the sum of FITs generated by the BOPs (indicated in <span style=\"color:red;\"><b>red</b></span>
|
38
|
+
above), we obtain 1 + 15 + 58 = 74.</p>\r\n<p>Consider the following tenth degree
|
39
|
+
polynomial generating function:</p>\r\n<p style=\"text-align:center;\"><var>u</var><sub><var>n</var></sub>
|
40
|
+
= 1 <img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
|
41
|
+
style=\"vertical-align:middle;\"><var>n</var> + <var>n</var><sup>2</sup><img src=\"images/symbol_minus.gif\"
|
42
|
+
width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var><sup>3</sup>
|
43
|
+
+ <var>n</var><sup>4</sup><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
|
44
|
+
alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var><sup>5</sup>
|
45
|
+
+ <var>n</var><sup>6</sup><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
|
46
|
+
alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var><sup>7</sup>
|
47
|
+
+ <var>n</var><sup>8</sup><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\"
|
48
|
+
alt=\"−\" border=\"0\" style=\"vertical-align:middle;\"><var>n</var><sup>9</sup>
|
49
|
+
+ <var>n</var><sup>10</sup></p>\r\n<p>Find the sum of FITs for the BOPs.</p>\r\n\r\n"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
:id: 102
|
3
|
+
:name: Triangle containment
|
4
|
+
:url: http://projecteuler.net/problem=102
|
5
|
+
:content: "\r\n\n<p>Three distinct points are plotted at random on a Cartesian plane,
|
6
|
+
for which -1000 <img src=\"images/symbol_le.gif\" width=\"10\" height=\"12\" alt=\"≤\"
|
7
|
+
border=\"0\" style=\"vertical-align:middle;\"><i>x</i>, <i>y</i> <img src=\"images/symbol_le.gif\"
|
8
|
+
width=\"10\" height=\"12\" alt=\"≤\" border=\"0\" style=\"vertical-align:middle;\">
|
9
|
+
1000, such that a triangle is formed.</p>\n<p>Consider the following two triangles:</p>\n<p
|
10
|
+
style=\"text-align:center;\">A(-340,495), B(-153,-910), C(835,-947)<br><br>\nX(-175,41),
|
11
|
+
Y(-421,-714), Z(574,-645)</p>\n<p>It can be verified that triangle ABC contains
|
12
|
+
the origin, whereas triangle XYZ does not.</p>\n<p>Using <a href=\"project/triangles.txt\">triangles.txt</a>
|
13
|
+
(right click and 'Save Link/Target As...'), a 27K text file containing the co-ordinates
|
14
|
+
of one thousand \"random\" triangles, find the number of triangles for which the
|
15
|
+
interior contains the origin.</p>\n<p class=\"info\">NOTE: The first two examples
|
16
|
+
in the file represent the triangles in the example given above.</p>\n\r\n"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
:id: 103
|
3
|
+
:name: 'Special subset sums: optimum'
|
4
|
+
:url: http://projecteuler.net/problem=103
|
5
|
+
:content: "\r\n<p>Let S(A) represent the sum of elements in set A of size <i>n</i>.
|
6
|
+
We shall call it a special sum set if for any two non-empty disjoint subsets, B
|
7
|
+
and C, the following properties are true:</p>\r\n<ol style=\"list-style-type:lower-roman;\">\n<li>S(B)
|
8
|
+
<img src=\"images/symbol_ne.gif\" width=\"11\" height=\"10\" alt=\"≠\" border=\"0\"
|
9
|
+
style=\"vertical-align:middle;\"> S(C); that is, sums of subsets cannot be equal.</li>\r\n<li>If
|
10
|
+
B contains more elements than C then S(B) <img src=\"images/symbol_gt.gif\" width=\"10\"
|
11
|
+
height=\"10\" alt=\">\" border=\"0\" style=\"vertical-align:middle;\"> S(C).</li>\r\n</ol>\n<p>If
|
12
|
+
S(A) is minimised for a given <i>n</i>, we shall call it an optimum special sum
|
13
|
+
set. The first five optimum special sum sets are given below.</p>\r\n<p style=\"margin-left:50px;\"><i>n</i>
|
14
|
+
= 1: {1}<br><i>n</i> = 2: {1, 2}<br><i>n</i> = 3: {2, 3, 4}<br><i>n</i> = 4: {3,
|
15
|
+
5, 6, 7}<br><i>n</i> = 5: {6, 9, 11, 12, 13}</p>\r\n<p>It <i>seems</i> that for
|
16
|
+
a given optimum set, A = {<i>a</i><sub>1</sub>, <i>a</i><sub>2</sub>, ... , <i>a</i><sub>n</sub>},
|
17
|
+
the next optimum set is of the form B = {<i>b</i>, <i>a</i><sub>1</sub>+<i>b</i>,
|
18
|
+
<i>a</i><sub>2</sub>+<i>b</i>, ... ,<i>a</i><sub>n</sub>+<i>b</i>}, where <i>b</i>
|
19
|
+
is the \"middle\" element on the previous row.</p>\r\n<p>By applying this \"rule\"
|
20
|
+
we would expect the optimum set for <i>n</i> = 6 to be A = {11, 17, 20, 22, 23,
|
21
|
+
24}, with S(A) = 117. However, this is not the optimum set, as we have merely applied
|
22
|
+
an algorithm to provide a near optimum set. The optimum set for <i>n</i> = 6 is
|
23
|
+
A = {11, 18, 19, 20, 22, 25}, with S(A) = 115 and corresponding set string: 111819202225.</p>\r\n<p>Given
|
24
|
+
that A is an optimum special sum set for <i>n</i> = 7, find its set string.</p>\r\n<p
|
25
|
+
class=\"info\">NOTE: This problem is related to problems <a href=\"index.php?section=problems&id=105\">105</a>
|
26
|
+
and <a href=\"index.php?section=problems&id=106\">106</a>.</p>\r\n"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
:id: 104
|
3
|
+
:name: Pandigital Fibonacci ends
|
4
|
+
:url: http://projecteuler.net/problem=104
|
5
|
+
:content: "\r\n\n<p>The Fibonacci sequence is defined by the recurrence relation:</p>\n<blockquote>F<sub><i>n</i></sub>
|
6
|
+
= F<sub><i>n</i><img src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\"
|
7
|
+
border=\"0\" style=\"vertical-align:middle;\">1</sub> + F<sub><i>n</i><img src=\"images/symbol_minus.gif\"
|
8
|
+
width=\"9\" height=\"3\" alt=\"−\" border=\"0\" style=\"vertical-align:middle;\">2</sub>,
|
9
|
+
where F<sub>1</sub> = 1 and F<sub>2</sub> = 1.</blockquote>\n<p>It turns out that
|
10
|
+
F<sub>541</sub>, which contains 113 digits, is the first Fibonacci number for which
|
11
|
+
the last nine digits are 1-9 pandigital (contain all the digits 1 to 9, but not
|
12
|
+
necessarily in order). And F<sub>2749</sub>, which contains 575 digits, is the first
|
13
|
+
Fibonacci number for which the first nine digits are 1-9 pandigital.</p>\n<p>Given
|
14
|
+
that F<sub><i>k</i></sub> is the first Fibonacci number for which the first nine
|
15
|
+
digits AND the last nine digits are 1-9 pandigital, find <i>k</i>.</p>\n\r\n"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
:id: 105
|
3
|
+
:name: 'Special subset sums: testing'
|
4
|
+
:url: http://projecteuler.net/problem=105
|
5
|
+
:content: "\r\n<p>Let S(A) represent the sum of elements in set A of size <i>n</i>.
|
6
|
+
We shall call it a special sum set if for any two non-empty disjoint subsets, B
|
7
|
+
and C, the following properties are true:</p>\r\n<ol style=\"list-style-type:lower-roman;\">\n<li>S(B)
|
8
|
+
<img src=\"images/symbol_ne.gif\" width=\"11\" height=\"10\" alt=\"≠\" border=\"0\"
|
9
|
+
style=\"vertical-align:middle;\"> S(C); that is, sums of subsets cannot be equal.</li>\r\n<li>If
|
10
|
+
B contains more elements than C then S(B) <img src=\"images/symbol_gt.gif\" width=\"10\"
|
11
|
+
height=\"10\" alt=\">\" border=\"0\" style=\"vertical-align:middle;\"> S(C).</li>\r\n</ol>\n<p>For
|
12
|
+
example, {81, 88, 75, 42, 87, 84, 86, 65} is not a special sum set because 65 +
|
13
|
+
87 + 88 = 75 + 81 + 84, whereas {157, 150, 164, 119, 79, 159, 161, 139, 158} satisfies
|
14
|
+
both rules for all possible subset pair combinations and S(A) = 1286.</p>\r\n<p>Using
|
15
|
+
<a href=\"project/sets.txt\">sets.txt</a> (right click and \"Save Link/Target As...\"),
|
16
|
+
a 4K text file with one-hundred sets containing seven to twelve elements (the two
|
17
|
+
examples given above are the first two sets in the file), identify all the special
|
18
|
+
sum sets, A<sub>1</sub>, A<sub>2</sub>, ..., A<sub><i>k</i></sub>, and find the
|
19
|
+
value of S(A<sub>1</sub>) + S(A<sub>2</sub>) + ... + S(A<sub><i>k</i></sub>).</p>\r\n<p
|
20
|
+
class=\"info\">NOTE: This problem is related to problems <a href=\"index.php?section=problems&id=103\">103</a>
|
21
|
+
and <a href=\"index.php?section=problems&id=106\">106</a>.</p>\r\n"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
:id: 106
|
3
|
+
:name: 'Special subset sums: meta-testing'
|
4
|
+
:url: http://projecteuler.net/problem=106
|
5
|
+
:content: "\r\n<p>Let S(A) represent the sum of elements in set A of size <i>n</i>.
|
6
|
+
We shall call it a special sum set if for any two non-empty disjoint subsets, B
|
7
|
+
and C, the following properties are true:</p>\r\n<ol style=\"list-style-type:lower-roman;\">\n<li>S(B)
|
8
|
+
<img src=\"images/symbol_ne.gif\" width=\"11\" height=\"10\" alt=\"≠\" border=\"0\"
|
9
|
+
style=\"vertical-align:middle;\"> S(C); that is, sums of subsets cannot be equal.</li>\r\n<li>If
|
10
|
+
B contains more elements than C then S(B) <img src=\"images/symbol_gt.gif\" width=\"10\"
|
11
|
+
height=\"10\" alt=\">\" border=\"0\" style=\"vertical-align:middle;\"> S(C).</li>\r\n</ol>\n<p>For
|
12
|
+
this problem we shall assume that a given set contains <i>n</i> strictly increasing
|
13
|
+
elements and it already satisfies the second rule.</p>\r\n<p>Surprisingly, out of
|
14
|
+
the 25 possible subset pairs that can be obtained from a set for which <i>n</i>
|
15
|
+
= 4, only 1 of these pairs need to be tested for equality (first rule). Similarly,
|
16
|
+
when <i>n</i> = 7, only 70 out of the 966 subset pairs need to be tested.</p>\r\n<p>For
|
17
|
+
<i>n</i> = 12, how many of the 261625 subset pairs that can be obtained need to
|
18
|
+
be tested for equality?</p>\r\n<p class=\"info\">NOTE: This problem is related to
|
19
|
+
problems <a href=\"index.php?section=problems&id=103\">103</a> and <a href=\"index.php?section=problems&id=105\">105</a>.</p>\r\n"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
:id: 107
|
3
|
+
:name: Minimal network
|
4
|
+
:url: http://projecteuler.net/problem=107
|
5
|
+
:content: "\r\n\n<p>The following undirected network consists of seven vertices and
|
6
|
+
twelve edges with a total weight of 243.</p>\n<div style=\"text-align:center;\">\n<img
|
7
|
+
src=\"project/images/p_107_1.gif\" width=\"381\" height=\"278\" alt=\"\"><br>\n</div>\n<p>The
|
8
|
+
same network can be represented by the matrix below.</p>\n<table cellpadding=\"5\"
|
9
|
+
cellspacing=\"0\" border=\"1\" align=\"center\">\n<tr>\n<td> </td>\n<td><b>A</b></td>\n<td><b>B</b></td>\n<td><b>C</b></td>\n<td><b>D</b></td>\n<td><b>E</b></td>\n<td><b>F</b></td>\n<td><b>G</b></td>\n</tr>\n<tr>\n<td><b>A</b></td>\n<td>-</td>\n<td>16</td>\n<td>12</td>\n<td>21</td>\n<td>-</td>\n<td>-</td>\n<td>-</td>\n</tr>\n<tr>\n<td><b>B</b></td>\n<td>16</td>\n<td>-</td>\n<td>-</td>\n<td>17</td>\n<td>20</td>\n<td>-</td>\n<td>-</td>\n</tr>\n<tr>\n<td><b>C</b></td>\n<td>12</td>\n<td>-</td>\n<td>-</td>\n<td>28</td>\n<td>-</td>\n<td>31</td>\n<td>-</td>\n</tr>\n<tr>\n<td><b>D</b></td>\n<td>21</td>\n<td>17</td>\n<td>28</td>\n<td>-</td>\n<td>18</td>\n<td>19</td>\n<td>23</td>\n</tr>\n<tr>\n<td><b>E</b></td>\n<td>-</td>\n<td>20</td>\n<td>-</td>\n<td>18</td>\n<td>-</td>\n<td>-</td>\n<td>11</td>\n</tr>\n<tr>\n<td><b>F</b></td>\n<td>-</td>\n<td>-</td>\n<td>31</td>\n<td>19</td>\n<td>-</td>\n<td>-</td>\n<td>27</td>\n</tr>\n<tr>\n<td><b>G</b></td>\n<td>-</td>\n<td>-</td>\n<td>-</td>\n<td>23</td>\n<td>11</td>\n<td>27</td>\n<td>-</td>\n</tr>\n</table>\n<p>However,
|
10
|
+
it is possible to optimise the network by removing some edges and still ensure that
|
11
|
+
all points on the network remain connected. The network which achieves the maximum
|
12
|
+
saving is shown below. It has a weight of 93, representing a saving of 243 <img
|
13
|
+
src=\"images/symbol_minus.gif\" width=\"9\" height=\"3\" alt=\"−\" border=\"0\"
|
14
|
+
style=\"vertical-align:middle;\"> 93 = 150 from the original network.</p>\n<div
|
15
|
+
style=\"text-align:center;\">\n<img src=\"project/images/p_107_2.gif\" width=\"385\"
|
16
|
+
height=\"288\" alt=\"\"><br>\n</div>\n<p>Using <a href=\"project/network.txt\">network.txt</a>
|
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.</p>\n\r\n"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
:id: 108
|
3
|
+
:name: Diophantine reciprocals I
|
4
|
+
:url: http://projecteuler.net/problem=108
|
5
|
+
:content: "\r\n<p>In the following equation <var>x</var>, <var>y</var>, and <var>n</var>
|
6
|
+
are positive integers.</p>\r\n<div style=\"text-align:center;\">\r\n<table align=\"center\"><tr>\n<td><div
|
7
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
8
|
+
height=\"1\" alt=\"\"><br><var>x</var>\n</div></td>\r\n<td> + </td>\r\n<td><div
|
9
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
10
|
+
height=\"1\" alt=\"\"><br><var>y</var>\n</div></td>\r\n<td> = </td>\r\n<td><div
|
11
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
12
|
+
height=\"1\" alt=\"\"><br><var>n</var>\n</div></td>\r\n</tr></table>\n</div>\r\n<p>For
|
13
|
+
<var>n</var> = 4 there are exactly three distinct solutions:</p>\r\n<div style=\"text-align:center;\">\r\n<table
|
14
|
+
align=\"center\">\n<tr>\n<td><div style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\"
|
15
|
+
width=\"15\" height=\"1\" alt=\"\"><br> 5</div></td>\r\n<td> + </td>\r\n<td><div
|
16
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
17
|
+
height=\"1\" alt=\"\"><br> 20</div></td>\r\n<td> = </td>\r\n<td><div style=\"text-align:center;\">1<br><img
|
18
|
+
src=\"images/blackdot.gif\" width=\"15\" height=\"1\" alt=\"\"><br> 4</div></td>\r\n</tr>\n<tr>\n<td><div
|
19
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
20
|
+
height=\"1\" alt=\"\"><br> 6</div></td>\r\n<td> + </td>\r\n<td><div style=\"text-align:center;\">1<br><img
|
21
|
+
src=\"images/blackdot.gif\" width=\"15\" height=\"1\" alt=\"\"><br> 12</div></td>\r\n<td>
|
22
|
+
= </td>\r\n<td><div style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\"
|
23
|
+
width=\"15\" height=\"1\" alt=\"\"><br> 4</div></td>\r\n</tr>\n<tr>\n<td><div style=\"text-align:center;\">1<br><img
|
24
|
+
src=\"images/blackdot.gif\" width=\"15\" height=\"1\" alt=\"\"><br> 8</div></td>\r\n<td>
|
25
|
+
+ </td>\r\n<td><div style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\"
|
26
|
+
width=\"15\" height=\"1\" alt=\"\"><br> 8</div></td>\r\n<td> = </td>\r\n<td><div
|
27
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
28
|
+
height=\"1\" alt=\"\"><br> 4</div></td>\r\n</tr>\n</table>\n</div>\r\n<p>What is
|
29
|
+
the least value of <var>n</var> for which the number of distinct solutions exceeds
|
30
|
+
one-thousand?</p>\r\n<p class=\"info\">NOTE: This problem is an easier version of
|
31
|
+
problem <a href=\"index.php?section=problems&id=110\">110</a>; it is strongly
|
32
|
+
advised that you solve this one first.</p>\r\n"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
:id: 109
|
3
|
+
:name: Darts
|
4
|
+
:url: http://projecteuler.net/problem=109
|
5
|
+
:content: "\r\n<p>In the game of darts a player throws three darts at a target board
|
6
|
+
which is split into twenty equal sized sections numbered one to twenty.</p>\r\n<div
|
7
|
+
style=\"text-align:center;\">\r\n<img src=\"project/images/p_109.gif\" width=\"400\"
|
8
|
+
height=\"400\" alt=\"\"><br>\n</div>\r\n<p>The score of a dart is determined by
|
9
|
+
the number of the region that the dart lands in. A dart landing outside the red/green
|
10
|
+
outer ring scores zero. The black and cream regions inside this ring represent single
|
11
|
+
scores. However, the red/green outer ring and middle ring score double and treble
|
12
|
+
scores respectively.</p>\r\n<p>At the centre of the board are two concentric circles
|
13
|
+
called the bull region, or bulls-eye. The outer bull is worth 25 points and the
|
14
|
+
inner bull is a double, worth 50 points.</p>\r\n<p>There are many variations of
|
15
|
+
rules but in the most popular game the players will begin with a score 301 or 501
|
16
|
+
and the first player to reduce their running total to zero is a winner. However,
|
17
|
+
it is normal to play a \"doubles out\" system, which means that the player must
|
18
|
+
land a double (including the double bulls-eye at the centre of the board) on their
|
19
|
+
final dart to win; any other dart that would reduce their running total to one or
|
20
|
+
lower means the score for that set of three darts is \"bust\".</p>\r\n<p>When a
|
21
|
+
player is able to finish on their current score it is called a \"checkout\" and
|
22
|
+
the highest checkout is 170: T20 T20 D25 (two treble 20s and double bull).</p>\r\n<p>There
|
23
|
+
are exactly eleven distinct ways to checkout on a score of 6:</p>\r\n<div style=\"text-align:center;\">\r\n<table
|
24
|
+
border=\"1\" cellpadding=\"3\" cellspacing=\"0\" align=\"center\">\n<tr>\n<td>\n<img
|
25
|
+
src=\"images/spacer.gif\" width=\"80\" height=\"1\" alt=\"\"><br>D3</td>\r\n<td>\n<img
|
26
|
+
src=\"images/spacer.gif\" width=\"80\" height=\"1\" alt=\"\"><br> </td>\r\n<td>\n<img
|
27
|
+
src=\"images/spacer.gif\" width=\"80\" height=\"1\" alt=\"\"><br> </td>\r\n</tr>\n<tr>\n<td>D1</td>\r\n<td>D2</td>\r\n<td> </td>\r\n</tr>\n<tr>\n<td>S2</td>\r\n<td>D2</td>\r\n<td> </td>\r\n</tr>\n<tr>\n<td>D2</td>\r\n<td>D1</td>\r\n<td> </td>\r\n</tr>\n<tr>\n<td>S4</td>\r\n<td>D1</td>\r\n<td> </td>\r\n</tr>\n<tr>\n<td>S1</td>\r\n<td>S1</td>\r\n<td>D2</td>\r\n</tr>\n<tr>\n<td>S1</td>\r\n<td>T1</td>\r\n<td>D1</td>\r\n</tr>\n<tr>\n<td>S1</td>\r\n<td>S3</td>\r\n<td>D1</td>\r\n</tr>\n<tr>\n<td>D1</td>\r\n<td>D1</td>\r\n<td>D1</td>\r\n</tr>\n<tr>\n<td>D1</td>\r\n<td>S2</td>\r\n<td>D1</td>\r\n</tr>\n<tr>\n<td>S2</td>\r\n<td>S2</td>\r\n<td>D1</td>\r\n</tr>\n</table>\n</div>\r\n<p>Note
|
28
|
+
that D1 D2 is considered <b>different</b> to D2 D1 as they finish on different doubles.
|
29
|
+
However, the combination S1 T1 D1 is considered the <b>same</b> as T1 S1 D1.</p>\r\n<p>In
|
30
|
+
addition we shall not include misses in considering combinations; for example, D3
|
31
|
+
is the <b>same</b> as 0 D3 and 0 0 D3.</p>\r\n<p>Incredibly there are 42336 distinct
|
32
|
+
ways of checking out in total.</p>\r\n<p>How many distinct ways can a player checkout
|
33
|
+
with a score less than 100?</p>\r\n\r\n"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
:id: 11
|
3
|
+
:name: Largest product in a grid
|
4
|
+
:url: http://projecteuler.net/problem=11
|
5
|
+
:content: "\r\n<p>In the 20<img src=\"images/symbol_times.gif\" width=\"9\" height=\"9\"
|
6
|
+
alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">20 grid below, four numbers
|
7
|
+
along a diagonal line have been marked in red.</p>\r\n<p style=\"font-family:courier
|
8
|
+
new;text-align:center;font-size:10pt;\">\r\n08 02 22 97 38 15 00 40 00 75 04 05
|
9
|
+
07 78 52 12 50 77 91 08<br>\r\n49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04
|
10
|
+
56 62 00<br>\r\n81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65<br>\r\n52
|
11
|
+
70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91<br>\r\n22 31 16 71 51 67
|
12
|
+
63 89 41 92 36 54 22 40 40 28 66 33 13 80<br>\r\n24 47 32 60 99 03 45 02 44 75 33
|
13
|
+
53 78 36 84 20 35 17 12 50<br>\r\n32 98 81 28 64 23 67 10 <span style=\"color:#ff0000;\"><b>26</b></span>
|
14
|
+
38 40 67 59 54 70 66 18 38 64 70<br>\r\n67 26 20 68 02 62 12 20 95 <span style=\"color:#ff0000;\"><b>63</b></span>
|
15
|
+
94 39 63 08 40 91 66 49 94 21<br>\r\n24 55 58 05 66 73 99 26 97 17 <span style=\"color:#ff0000;\"><b>78</b></span>
|
16
|
+
78 96 83 14 88 34 89 63 72<br>\r\n21 36 23 09 75 00 76 44 20 45 35 <span style=\"color:#ff0000;\"><b>14</b></span>
|
17
|
+
00 61 33 97 34 31 33 95<br>\r\n78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09
|
18
|
+
53 56 92<br>\r\n16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57<br>\r\n86
|
19
|
+
56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58<br>\r\n19 80 81 68 05 94
|
20
|
+
47 69 28 73 92 13 86 52 17 77 04 89 55 40<br>\r\n04 52 08 83 97 35 99 16 07 97 57
|
21
|
+
32 16 26 26 79 33 27 98 66<br>\r\n88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32
|
22
|
+
63 93 53 69<br>\r\n04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36<br>\r\n20
|
23
|
+
69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16<br>\r\n20 73 35 29 78 31
|
24
|
+
90 01 74 31 49 71 48 86 81 16 23 57 05 54<br>\r\n01 70 54 71 83 51 54 69 16 92 33
|
25
|
+
48 61 43 52 01 89 19 67 48<br></p>\r\n<p>The product of these numbers is 26 <img
|
26
|
+
src=\"images/symbol_times.gif\" width=\"9\" height=\"9\" alt=\"×\" border=\"0\"
|
27
|
+
style=\"vertical-align:middle;\"> 63 <img src=\"images/symbol_times.gif\" width=\"9\"
|
28
|
+
height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\"> 78 <img src=\"images/symbol_times.gif\"
|
29
|
+
width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">
|
30
|
+
14 = 1788696.</p>\r\n<p>What is the greatest product of four adjacent numbers in
|
31
|
+
the same direction (up, down, left, right, or diagonally) in the 20<img src=\"images/symbol_times.gif\"
|
32
|
+
width=\"9\" height=\"9\" alt=\"×\" border=\"0\" style=\"vertical-align:middle;\">20
|
33
|
+
grid?</p>\r\n\r\n"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
:id: 110
|
3
|
+
:name: Diophantine reciprocals II
|
4
|
+
:url: http://projecteuler.net/problem=110
|
5
|
+
:content: "\r\n<p>In the following equation <var>x</var>, <var>y</var>, and <var>n</var>
|
6
|
+
are positive integers.</p>\r\n<div style=\"text-align:center;\">\r\n<table align=\"center\"><tr>\n<td><div
|
7
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
8
|
+
height=\"1\" alt=\"\"><br><var>x</var>\n</div></td>\r\n<td> + </td>\r\n<td><div
|
9
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
10
|
+
height=\"1\" alt=\"\"><br><var>y</var>\n</div></td>\r\n<td> = </td>\r\n<td><div
|
11
|
+
style=\"text-align:center;\">1<br><img src=\"images/blackdot.gif\" width=\"15\"
|
12
|
+
height=\"1\" alt=\"\"><br><var>n</var>\n</div></td>\r\n</tr></table>\n</div>\r\n<p>It
|
13
|
+
can be verified that when <var>n</var> = 1260 there are 113 distinct solutions and
|
14
|
+
this is the least value of <var>n</var> for which the total number of distinct solutions
|
15
|
+
exceeds one hundred.</p>\r\n<p>What is the least value of <var>n</var> for which
|
16
|
+
the number of distinct solutions exceeds four million?</p>\r\n<p class=\"info\">NOTE:
|
17
|
+
This problem is a much more difficult version of problem <a href=\"index.php?section=problems&id=108\">108</a>
|
18
|
+
and as it is well beyond the limitations of a brute force approach it requires a
|
19
|
+
clever implementation.</p>\r\n"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
:id: 111
|
3
|
+
:name: Primes with runs
|
4
|
+
:url: http://projecteuler.net/problem=111
|
5
|
+
:content: "\r\n<p>Considering 4-digit primes containing repeated digits it is clear
|
6
|
+
that they cannot all be the same: 1111 is divisible by 11, 2222 is divisible by
|
7
|
+
22, and so on. But there are nine 4-digit primes containing three ones:</p>\r\n<p
|
8
|
+
style=\"text-align:center;\">1117, 1151, 1171, 1181, 1511, 1811, 2111, 4111, 8111</p>\r\n<p>We
|
9
|
+
shall say that M(<i>n</i>, <i>d</i>) represents the maximum number of repeated digits
|
10
|
+
for an <i>n</i>-digit prime where <i>d</i> is the repeated digit, N(<i>n</i>, <i>d</i>)
|
11
|
+
represents the number of such primes, and S(<i>n</i>, <i>d</i>) represents the sum
|
12
|
+
of these primes.</p>\r\n<p>So M(4, 1) = 3 is the maximum number of repeated digits
|
13
|
+
for a 4-digit prime where one is the repeated digit, there are N(4, 1) = 9 such
|
14
|
+
primes, and the sum of these primes is S(4, 1) = 22275. It turns out that for <i>d</i>
|
15
|
+
= 0, it is only possible to have M(4, 0) = 2 repeated digits, but there are N(4,
|
16
|
+
0) = 13 such cases.</p>\r\n<p>In the same way we obtain the following results for
|
17
|
+
4-digit primes.</p>\r\n<div style=\"text-align:center;\">\r\n<table align=\"center\"
|
18
|
+
border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n<tr>\n<td><b>Digit, <i>d</i></b></td>\r\n<td><b>M(4,
|
19
|
+
<i>d</i>)</b></td>\r\n<td><b>N(4, <i>d</i>)</b></td>\r\n<td><b>S(4, <i>d</i>)</b></td>\r\n</tr>\n<tr>\n<td>0</td>\r\n<td>2</td>\r\n<td>13</td>\r\n<td>67061</td>\r\n</tr>\n<tr>\n<td>1</td>\r\n<td>3</td>\r\n<td>9</td>\r\n<td>22275</td>\r\n</tr>\n<tr>\n<td>2</td>\r\n<td>3</td>\r\n<td>1</td>\r\n<td>2221</td>\r\n</tr>\n<tr>\n<td>3</td>\r\n<td>3</td>\r\n<td>12</td>\r\n<td>46214</td>\r\n</tr>\n<tr>\n<td>4</td>\r\n<td>3</td>\r\n<td>2</td>\r\n<td>8888</td>\r\n</tr>\n<tr>\n<td>5</td>\r\n<td>3</td>\r\n<td>1</td>\r\n<td>5557</td>\r\n</tr>\n<tr>\n<td>6</td>\r\n<td>3</td>\r\n<td>1</td>\r\n<td>6661</td>\r\n</tr>\n<tr>\n<td>7</td>\r\n<td>3</td>\r\n<td>9</td>\r\n<td>57863</td>\r\n</tr>\n<tr>\n<td>8</td>\r\n<td>3</td>\r\n<td>1</td>\r\n<td>8887</td>\r\n</tr>\n<tr>\n<td>9</td>\r\n<td>3</td>\r\n<td>7</td>\r\n<td>48073</td>\r\n</tr>\n</table>\n</div>\r\n<p>For
|
20
|
+
<i>d</i> = 0 to 9, the sum of all S(4, <i>d</i>) is 273700.</p>\r\n<p>Find the sum
|
21
|
+
of all S(10, <i>d</i>).</p>\r\n\r\n"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
:id: 112
|
3
|
+
:name: Bouncy numbers
|
4
|
+
:url: http://projecteuler.net/problem=112
|
5
|
+
:content: "\r\n<p>Working from left-to-right if no digit is exceeded by the digit
|
6
|
+
to its left it is called an increasing number; for example, 134468.</p>\r\n<p>Similarly
|
7
|
+
if no digit is exceeded by the digit to its right it is called a decreasing number;
|
8
|
+
for example, 66420.</p>\r\n<p>We shall call a positive integer that is neither increasing
|
9
|
+
nor decreasing a \"bouncy\" number; for example, 155349.</p>\r\n<p>Clearly there
|
10
|
+
cannot be any bouncy numbers below one-hundred, but just over half of the numbers
|
11
|
+
below one-thousand (525) are bouncy. In fact, the least number for which the proportion
|
12
|
+
of bouncy numbers first reaches 50% is 538.</p>\r\n<p>Surprisingly, bouncy numbers
|
13
|
+
become more and more common and by the time we reach 21780 the proportion of bouncy
|
14
|
+
numbers is equal to 90%.</p>\r\n<p>Find the least number for which the proportion
|
15
|
+
of bouncy numbers is exactly 99%.</p>\r\n\r\n"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
:id: 113
|
3
|
+
:name: Non-bouncy numbers
|
4
|
+
:url: http://projecteuler.net/problem=113
|
5
|
+
:content: "\r\n\n<p>Working from left-to-right if no digit is exceeded by the digit
|
6
|
+
to its left it is called an increasing number; for example, 134468.</p>\n<p>Similarly
|
7
|
+
if no digit is exceeded by the digit to its right it is called a decreasing number;
|
8
|
+
for example, 66420.</p>\n<p>We shall call a positive integer that is neither increasing
|
9
|
+
nor decreasing a \"bouncy\" number; for example, 155349.</p>\n<p>As <i>n</i> increases,
|
10
|
+
the proportion of bouncy numbers below <i>n</i> increases such that there are only
|
11
|
+
12951 numbers below one-million that are not bouncy and only 277032 non-bouncy numbers
|
12
|
+
below 10<sup>10</sup>.</p>\n<p>How many numbers below a googol (10<sup>100</sup>)
|
13
|
+
are not bouncy?</p>\n\r\n"
|
@@ -0,0 +1,106 @@
|
|
1
|
+
---
|
2
|
+
:id: 114
|
3
|
+
:name: Counting block combinations I
|
4
|
+
:url: http://projecteuler.net/problem=114
|
5
|
+
:content: "\r\n<p>A row measuring seven units in length has red blocks with a minimum
|
6
|
+
length of three units placed on it, such that any two red blocks (which are allowed
|
7
|
+
to be different lengths) are separated by at least one black square. There are exactly
|
8
|
+
seventeen ways of doing this.</p>\r\n\r\n<table cellpadding=\"5\" cellspacing=\"1\"
|
9
|
+
border=\"0\" align=\"center\">\n<tr>\n<td>\r\n<table cellspacing=\"1\" cellpadding=\"0\"
|
10
|
+
border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
11
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
12
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
13
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
14
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
15
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
16
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
17
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
18
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td colspan=\"3\" style=\"background-color:#cc0000\"><img
|
19
|
+
src=\"images/spacer.gif\" width=\"66\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
20
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
21
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
22
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
23
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
24
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
25
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"3\"
|
26
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"66\" height=\"20\"
|
27
|
+
alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
28
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
29
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
30
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n</tr>\n<tr>\n<td>\r\n<table
|
31
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
32
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
33
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"3\"
|
34
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"66\" height=\"20\"
|
35
|
+
alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
36
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
37
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
38
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
39
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
40
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
41
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"3\"
|
42
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"66\" height=\"20\"
|
43
|
+
alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
44
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
45
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
46
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
47
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
48
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
49
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"3\"
|
50
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"66\" height=\"20\"
|
51
|
+
alt=\"\"></td>\r\n</tr></table>\n</td>\r\n</tr>\n<tr>\n<td>\r\n<table cellspacing=\"1\"
|
52
|
+
cellpadding=\"0\" border=\"1\"><tr>\n<td colspan=\"3\" style=\"background-color:#cc0000\"><img
|
53
|
+
src=\"images/spacer.gif\" width=\"66\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
54
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"3\"
|
55
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"66\" height=\"20\"
|
56
|
+
alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table cellspacing=\"1\" cellpadding=\"0\"
|
57
|
+
border=\"1\"><tr>\n<td colspan=\"4\" style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\"
|
58
|
+
width=\"89\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
59
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
60
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
61
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
62
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
63
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"4\"
|
64
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"89\" height=\"20\"
|
65
|
+
alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
66
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
67
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n</tr>\n<tr>\n<td>\r\n<table
|
68
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
69
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
70
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"4\"
|
71
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"89\" height=\"20\"
|
72
|
+
alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
73
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
74
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
75
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
76
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
77
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"4\"
|
78
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"89\" height=\"20\"
|
79
|
+
alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table cellspacing=\"1\" cellpadding=\"0\"
|
80
|
+
border=\"1\"><tr>\n<td colspan=\"5\" style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\"
|
81
|
+
width=\"112\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
82
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
83
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n</tr>\n<tr>\n<td>\r\n<table
|
84
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
85
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"5\"
|
86
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"112\"
|
87
|
+
height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img src=\"images/spacer.gif\"
|
88
|
+
width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table
|
89
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
90
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
91
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"5\"
|
92
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"112\"
|
93
|
+
height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table cellspacing=\"1\"
|
94
|
+
cellpadding=\"0\" border=\"1\"><tr>\n<td colspan=\"6\" style=\"background-color:#cc0000\"><img
|
95
|
+
src=\"images/spacer.gif\" width=\"135\" height=\"20\" alt=\"\"></td>\r\n<td style=\"background-color:#000000\"><img
|
96
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n</tr>\n<tr>\n<td>\r\n<table
|
97
|
+
cellspacing=\"1\" cellpadding=\"0\" border=\"1\"><tr>\n<td style=\"background-color:#000000\"><img
|
98
|
+
src=\"images/spacer.gif\" width=\"20\" height=\"20\" alt=\"\"></td>\r\n<td colspan=\"6\"
|
99
|
+
style=\"background-color:#cc0000\"><img src=\"images/spacer.gif\" width=\"135\"
|
100
|
+
height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td>\r\n<table cellspacing=\"1\"
|
101
|
+
cellpadding=\"0\" border=\"1\"><tr>\n<td colspan=\"7\" style=\"background-color:#cc0000\"><img
|
102
|
+
src=\"images/spacer.gif\" width=\"158\" height=\"20\" alt=\"\"></td>\r\n</tr></table>\n</td>\r\n<td> </td>\r\n</tr>\n</table>\n<p>How
|
103
|
+
many ways can a row measuring fifty units in length be filled?</p>\r\n<p class=\"info\">NOTE:
|
104
|
+
Although the example above does not lend itself to the possibility, in general it
|
105
|
+
is permitted to mix block sizes. For example, on a row measuring eight units in
|
106
|
+
length you could use red (3), black (1), and red (4).</p>\r\n"
|