[HW1] Reduce cost from O(n^2) to O(n)
[HW1] Reduce cost from O(n^2) to O(n)

--Overview
1. Do not call ```N()``` inside a for loop operation and
compute the probability manually instead of using ```freq()```.
Cost is reduced from O(n^2) to O(n)
2. Output a text file with filename ```output.txt```
3. Remove useless back-slash

mondwan/py-iems5723