lc_1,lc_2,lc_3=map(int,input().split())
yr_num=list(map(int,input().split()))
map_money=list(map(int,input().split()))
c=0;money=0
for rn in range(5):
if yr_num[rn]==lc_1:
money+=map_money[rn]
elif yr_num[rn]==lc_2:
money+=map_money[rn]
elif yr_num[rn]==lc_3:
money-=map_money[rn]
c+=1
else:
continue
if money<0:
print(0)
elif c>=1:
print(money)
else:
print(money*2)
請問大家,問題到底出在哪........<(_ _)>
#13: 1% WA (line:1)
lc_1,lc_2,lc_3=map(int,input().split())
yr_num=list(map(int,input().split()))
map_money=list(map(int,input().split()))
c=0;money=0
for rn in range(5):
if yr_num[rn]==lc_1:
money+=map_money[rn]
elif yr_num[rn]==lc_2:
money+=map_money[rn]
elif yr_num[rn]==lc_3:
money-=map_money[rn]
c+=1
else:
continue
if money<0:
print(0)
elif c>=1:
print(money)
else:
print(money*2)
請問大家,問題到底出在哪........<(_ _)>
幸運號碼可能一樣,把elif yr_num[rn]==lc_2:改成if yr_num[rn]==lc_2:就過了