--- a/README Wed Feb 01 13:54:55 2017 +0000
+++ b/README Thu Feb 02 13:18:02 2017 +0000
@@ -39,4 +39,19 @@
ontime:
k1502660
k1502705
-k1502679
\ No newline at end of file
+k1502679
+
+
+
+
+-----------------------
+"Mounty, Jonathan" jonathan.mounty@kcl.ac.uk
+
+Task 1: Ok (1%)
+Task 2: Ok (2%)
+Task 3: OK (1%)
+Task 4: Ok (1%)
+Task 5: Ok (1%)
+Task 6: Not implemented (-2%)
+Task 7: OK (1%)
+Task 8: Not ok (-1%)
Binary file cws/cw04.pdf has changed
--- a/cws/cw04.tex Wed Feb 01 13:54:55 2017 +0000
+++ b/cws/cw04.tex Thu Feb 02 13:18:02 2017 +0000
@@ -141,7 +141,7 @@
number (for example $MMM$ is OK); non-repeatable digits cannot be
repeated at all (for example $VV$ is excluded).
-\item If a smaller digits precedes a bigger digit, then $I$ can precede $V$ and $C$; $X$ can preced
+\item If a smaller digits precedes a bigger digit, then $I$ can precede $V$ and $X$; $X$ can preced
$L$ and $C$; and $C$ can preced $D$ and $M$. No other combination is permitted in this case.
\item If a smaller digit precedes a bigger digit (for example $IV$), then the smaller number
--- a/progs/roman_sol.scala Wed Feb 01 13:54:55 2017 +0000
+++ b/progs/roman_sol.scala Thu Feb 02 13:18:02 2017 +0000
@@ -110,7 +110,7 @@
String2Int("MMVIII") // 2008
String2Int("MMXI") // 2011
-String2Int("MIM") // 1999
+String2Int("MIM") // 2001
String2Int("MCMLVI") // 1956
String2Int("III") // 3
@@ -152,6 +152,36 @@
addromanfile("roman.txt")
+val ls = """IIII
+IV
+VI
+IX
+MCMLXXIX
+MCMXLIV
+
+MDCLXI
+MMMCMXCIX
+XLVIII
+MMVIII
+
+MMXI
+MIM
+MCMLVI
+
+III
+XXX
+CCC
+MMM
+VII
+LXVI
+CL
+MCC
+IV
+IX
+XC
+MDCLXVI""".split("\n").map(_.trim).map(String2Int(_)).flatten
+
+String2Int("MIM")
// Part 2 about Validation of Roman Numerals
//===========================================