Add solution to problem number 8.

Signed-off-by: darkestkhan <darkestkhan@gmail.com>