Solution 1: 1390 Execution time: 0 ms Solution 2: 1457 Execution time: 1 ms