Getting run error

hey the logic seems fine and its running locally but while submitting getting run error

@pradyumn25jain it seems right
try removing the template and using int and declaring temp size as 1000005
if it still give run time send the updated code

|Ai|<=10^9 since we have a constraint we will need long long int

@pradyumn25jain int handles from -1e9 to 1e9

but with long long i am not getting any output

@pradyumn25jain check this done using int only

something was wrong on the server side i guess i refreshed and tried again , it was successfully submitted :slight_smile: thanks

oh ok np :smiley: @pradyumn25jain