Fix project, now use python 3.

This commit is contained in:
Bert Peters
2015-12-14 00:29:02 +01:00
parent cf7d12fbf0
commit 0b94c1e7dc
14 changed files with 35 additions and 34 deletions

View File

@@ -1,5 +1,6 @@
import fileinput
from operator import mul
from functools import reduce
totalArea = 0
totalRibbon = 0
@@ -14,6 +15,6 @@ for line in fileinput.input():
totalRibbon += 2 * (parts[0] + parts[1])
totalRibbon += reduce(mul, parts, 1)
print totalArea, "paper"
print totalRibbon, "ribbon"
print(totalArea, "paper")
print(totalRibbon, "ribbon")