add: swea/1284.py

This commit is contained in:
Gyubin Han
2024-05-01 00:00:35 +09:00
parent 2600340c03
commit b3270ad92e

12
swea/1284.py Normal file
View File

@@ -0,0 +1,12 @@
t=int(input())
for i in range(1,t+1):
p,q,r,s,w=map(int,input().split())
a=p*w
b=q
if w>r:
b+=(w-r)*s
print("#"+str(i),min(a,b))