From b3270ad92eb0fef87fd054533914518e7712de88 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Wed, 1 May 2024 00:00:35 +0900 Subject: [PATCH] add: swea/1284.py --- swea/1284.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 swea/1284.py 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)) +