Showing wrong answer in all test case

code- https://ide.codingblocks.com/s/294258

hello @anubhavb11

a) use long long .
b) search space
s=max in array * time
c) check output format u r asked to print modulo of thr answer

i didnt get the b) point
and i think according to constrains it can work in int

multiplication and summation may exceed the integer range