My issue
my code gives correct output for every situation where it is failing ? help me
My code
# cook your dish here
tc = int(input())
for i in range(tc):
monster ,hpi = map(int,input().split())
c_hp = list(map(int,input().split()))
c_hp.sort()
max_hit = c_hp[0] + ((monster - 1) * hpi)
max_hit=max(c_hp[-1],max_hit)
print(max_hit)
Problem Link: Monster Monster Practice Coding Problem