summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--01/01p1.bas31
-rw-r--r--01/01p1.prgbin0 -> 1495 bytes
-rw-r--r--01/01p2.bas45
-rw-r--r--01/01p2.prgbin0 -> 1698 bytes
-rw-r--r--01/data19
-rw-r--r--01/input200
6 files changed, 295 insertions, 0 deletions
diff --git a/01/01p1.bas b/01/01p1.bas
new file mode 100644
index 0000000..4f17cd8
--- /dev/null
+++ b/01/01p1.bas
@@ -0,0 +1,31 @@
+10 DATA 1686, 1983, 1801, 1890, 1910, 1722, 1571, 1952, 1602, 1551, 1144
+11 DATA 1208, 1335, 1914, 1656, 1515, 1600, 1520, 1683, 1679, 1800, 1889
+12 DATA 1717, 1592, 1617, 1756, 1646, 1596, 1874, 1595, 1660, 1748, 1946
+13 DATA 1734, 1852, 2006, 1685, 1668, 1607, 1677, 403 , 1312, 1828, 1627
+14 DATA 1925, 1657, 1536, 1522, 1557, 1636, 1586, 1654, 1541, 1363, 1844
+15 DATA 1951, 1765, 1872, 696, 1764, 1718, 1540, 1493, 1947, 1786, 1548
+16 DATA 1981, 1861, 1589, 1707, 1915, 1755, 1906, 1911, 1628, 1980, 1986
+17 DATA 1780, 1645, 741 , 1727, 524 , 1690, 1732, 1956, 1523, 1534, 1498
+18 DATA 1510, 372 , 1777, 1585, 1614, 1712, 1650, 702 , 1773, 1713, 1797
+19 DATA 1691, 1758, 1973, 1560, 1615, 1933, 1281, 1899, 1845, 1752, 1542
+20 DATA 1694, 1950, 1879, 1684, 1809, 1988, 1978, 1843, 1730, 1377, 1507
+21 DATA 1506, 1566, 935 , 1851, 1995, 1796, 1900, 896 , 171, 1728, 1635
+22 DATA 1810, 2003, 1580, 1789, 1709, 2007, 1639, 1726, 1537, 1976, 1538
+23 DATA 1544, 1626, 1876, 1840, 1953, 1710, 1661, 1563, 1836, 1358, 1550
+24 DATA 1112, 1832, 1555, 1394, 1912, 1884, 1524, 1689, 1775, 1724, 1366
+25 DATA 1966, 1549, 1931, 1975, 1500, 1667, 1674, 1771, 1631, 1662, 1902
+26 DATA 1970, 1864, 2004, 2010, 504 , 1714, 1917, 1907, 1704, 1501, 1812
+27 DATA 1349, 1577, 1638, 1886, 1157, 1761, 1676, 1731, 2001, 1261, 1154
+28 DATA 1769, 1529
+100 DIM A(200)
+110 FOR I=0TO199
+120 READ A(I)
+140 NEXT
+150 FOR I=0TO199
+160 B=A(I)
+170 FOR J=0TO199
+180 IF I=J THEN 210
+190 C=A(J)
+200 IF B+C=2020 THEN PRINT "!",B,C,B*C:STOP
+210 NEXT J
+220 NEXT I \ No newline at end of file
diff --git a/01/01p1.prg b/01/01p1.prg
new file mode 100644
index 0000000..23d32b4
--- /dev/null
+++ b/01/01p1.prg
Binary files differ
diff --git a/01/01p2.bas b/01/01p2.bas
new file mode 100644
index 0000000..3c992a0
--- /dev/null
+++ b/01/01p2.bas
@@ -0,0 +1,45 @@
+10 DATA 1686, 1983, 1801, 1890, 1910, 1722, 1571, 1952, 1602, 1551, 1144
+11 DATA 1208, 1335, 1914, 1656, 1515, 1600, 1520, 1683, 1679, 1800, 1889
+12 DATA 1717, 1592, 1617, 1756, 1646, 1596, 1874, 1595, 1660, 1748, 1946
+13 DATA 1734, 1852, 2006, 1685, 1668, 1607, 1677, 403 , 1312, 1828, 1627
+14 DATA 1925, 1657, 1536, 1522, 1557, 1636, 1586, 1654, 1541, 1363, 1844
+15 DATA 1951, 1765, 1872, 696, 1764, 1718, 1540, 1493, 1947, 1786, 1548
+16 DATA 1981, 1861, 1589, 1707, 1915, 1755, 1906, 1911, 1628, 1980, 1986
+17 DATA 1780, 1645, 741 , 1727, 524 , 1690, 1732, 1956, 1523, 1534, 1498
+18 DATA 1510, 372 , 1777, 1585, 1614, 1712, 1650, 702 , 1773, 1713, 1797
+19 DATA 1691, 1758, 1973, 1560, 1615, 1933, 1281, 1899, 1845, 1752, 1542
+20 DATA 1694, 1950, 1879, 1684, 1809, 1988, 1978, 1843, 1730, 1377, 1507
+21 DATA 1506, 1566, 935 , 1851, 1995, 1796, 1900, 896 , 171, 1728, 1635
+22 DATA 1810, 2003, 1580, 1789, 1709, 2007, 1639, 1726, 1537, 1976, 1538
+23 DATA 1544, 1626, 1876, 1840, 1953, 1710, 1661, 1563, 1836, 1358, 1550
+24 DATA 1112, 1832, 1555, 1394, 1912, 1884, 1524, 1689, 1775, 1724, 1366
+25 DATA 1966, 1549, 1931, 1975, 1500, 1667, 1674, 1771, 1631, 1662, 1902
+26 DATA 1970, 1864, 2004, 2010, 504 , 1714, 1917, 1907, 1704, 1501, 1812
+27 DATA 1349, 1577, 1638, 1886, 1157, 1761, 1676, 1731, 2001, 1261, 1154
+28 DATA 1769, 1529
+100 DIM A(200)
+110 FOR I=0TO199
+120 READ A(I)
+140 NEXT
+141 GOSUB 300
+150 FOR I=0TO199
+160 B=A(I)
+170 FOR J=0TO199
+180 IF J=I THEN 250
+190 C=A(J)
+200 FOR K=0TO199
+210 IF K=I OR K=J THEN 240
+220 D=A(K)
+230 IF B+C+D=2020 THEN PRINT "!",B,C,D,B*C*D:STOP
+240 NEXT K
+250 NEXT J
+260 NEXT I
+300 REM BUBBLE SORT
+301 X=200
+310 N=200
+320 FOR I=0TON-2
+330 FOR J=0TON-I-2
+340 X=A(J):Y=A(J+1)
+350 IF X>Y THEN A(J)=Y:A(J+1)=X
+360 NEXT : NEXT
+370 RETURN \ No newline at end of file
diff --git a/01/01p2.prg b/01/01p2.prg
new file mode 100644
index 0000000..7779442
--- /dev/null
+++ b/01/01p2.prg
Binary files differ
diff --git a/01/data b/01/data
new file mode 100644
index 0000000..e019204
--- /dev/null
+++ b/01/data
@@ -0,0 +1,19 @@
+10 data 1686, 1983, 1801, 1890, 1910, 1722, 1571, 1952, 1602, 1551, 1144
+11 data 1208, 1335, 1914, 1656, 1515, 1600, 1520, 1683, 1679, 1800, 1889
+12 data 1717, 1592, 1617, 1756, 1646, 1596, 1874, 1595, 1660, 1748, 1946
+13 data 1734, 1852, 2006, 1685, 1668, 1607, 1677, 403 , 1312, 1828, 1627
+14 data 1925, 1657, 1536, 1522, 1557, 1636, 1586, 1654, 1541, 1363, 1844
+15 data 1951, 1765, 1872, 696, 1764, 1718, 1540, 1493, 1947, 1786, 1548
+16 data 1981, 1861, 1589, 1707, 1915, 1755, 1906, 1911, 1628, 1980, 1986
+17 data 1780, 1645, 741 , 1727, 524 , 1690, 1732, 1956, 1523, 1534, 1498
+18 data 1510, 372 , 1777, 1585, 1614, 1712, 1650, 702 , 1773, 1713, 1797
+19 data 1691, 1758, 1973, 1560, 1615, 1933, 1281, 1899, 1845, 1752, 1542
+20 data 1694, 1950, 1879, 1684, 1809, 1988, 1978, 1843, 1730, 1377, 1507
+21 data 1506, 1566, 935 , 1851, 1995, 1796, 1900, 896 , 171, 1728, 1635
+22 data 1810, 2003, 1580, 1789, 1709, 2007, 1639, 1726, 1537, 1976, 1538
+23 data 1544, 1626, 1876, 1840, 1953, 1710, 1661, 1563, 1836, 1358, 1550
+24 data 1112, 1832, 1555, 1394, 1912, 1884, 1524, 1689, 1775, 1724, 1366
+25 data 1966, 1549, 1931, 1975, 1500, 1667, 1674, 1771, 1631, 1662, 1902
+26 data 1970, 1864, 2004, 2010, 504 , 1714, 1917, 1907, 1704, 1501, 1812
+27 data 1349, 1577, 1638, 1886, 1157, 1761, 1676, 1731, 2001, 1261, 1154
+28 data 1769, 1529
diff --git a/01/input b/01/input
new file mode 100644
index 0000000..102ef6c
--- /dev/null
+++ b/01/input
@@ -0,0 +1,200 @@
+1686
+1983
+1801
+1890
+1910
+1722
+1571
+1952
+1602
+1551
+1144
+1208
+1335
+1914
+1656
+1515
+1600
+1520
+1683
+1679
+1800
+1889
+1717
+1592
+1617
+1756
+1646
+1596
+1874
+1595
+1660
+1748
+1946
+1734
+1852
+2006
+1685
+1668
+1607
+1677
+403
+1312
+1828
+1627
+1925
+1657
+1536
+1522
+1557
+1636
+1586
+1654
+1541
+1363
+1844
+1951
+1765
+1872
+696
+1764
+1718
+1540
+1493
+1947
+1786
+1548
+1981
+1861
+1589
+1707
+1915
+1755
+1906
+1911
+1628
+1980
+1986
+1780
+1645
+741
+1727
+524
+1690
+1732
+1956
+1523
+1534
+1498
+1510
+372
+1777
+1585
+1614
+1712
+1650
+702
+1773
+1713
+1797
+1691
+1758
+1973
+1560
+1615
+1933
+1281
+1899
+1845
+1752
+1542
+1694
+1950
+1879
+1684
+1809
+1988
+1978
+1843
+1730
+1377
+1507
+1506
+1566
+935
+1851
+1995
+1796
+1900
+896
+171
+1728
+1635
+1810
+2003
+1580
+1789
+1709
+2007
+1639
+1726
+1537
+1976
+1538
+1544
+1626
+1876
+1840
+1953
+1710
+1661
+1563
+1836
+1358
+1550
+1112
+1832
+1555
+1394
+1912
+1884
+1524
+1689
+1775
+1724
+1366
+1966
+1549
+1931
+1975
+1500
+1667
+1674
+1771
+1631
+1662
+1902
+1970
+1864
+2004
+2010
+504
+1714
+1917
+1907
+1704
+1501
+1812
+1349
+1577
+1638
+1886
+1157
+1761
+1676
+1731
+2001
+1261
+1154
+1769
+1529