I tried to submit this code. but it was showing WA.
t=int(input())
for i in range(t):
l = [int(y) for y in input().split()]
n=l[0];m=l[1];x=l[2];y=l[3];
res=nm
if(2x<=y):
print(x* res)
elif 2x>y and x<=y:
print(x(res-res//2)+(y-x)(res//2))
else:
print(y(res - res//2))
This is my Code.
Kindly tell me some test cases where it will fail.
Thanks