代码如下,第一次是50分,一半AC一半WA了。重新读题发现要求输出的是整数,所以在print处加了个int强制转换,就全AC了。但是再回去也想不明白,全部都是整数,哪里出来的小数?
x = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
if x % a[0] == 0:
n1 = x / a[0]
else:
n1 = x // a[0] + 1
if x % b[0] == 0:
n2 = x / b[0]
else:
n2 = x // b[0] + 1
if x % c[0] == 0:
n3 = x / c[0]
else:
n3 = x // c[0] + 1
print(min(n1*a[1],n2*b[1],n3*c[1]))