ADDFRAC-April Challenge 10

Ad hoc mostly. O(n)