Problem 040 added

fast brute force