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=n*m
if(2*x<=y):

print(x* res)

elif 2

*x>y and x<=y:*

print(x(res-res//2)+(y-x)

print(x

*(res//2))*

else:

print(y(res - res//2))

else:

print(y

This is my Code.

Kindly tell me some test cases where it will fail.

Thanks