diff --git a/swea/1284.py b/swea/1284.py new file mode 100644 index 0000000..c6eed0a --- /dev/null +++ b/swea/1284.py @@ -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)) +