[bbone=text,466]GOT AC!!!![/bbone]
You have issues with integer overflow.
Thanks for your reply. But maximum array size cant be greater than 10^5 and all numbers are less than 10^6, that can be processed with int data type.Of course sum can be greater than 10^9 that I have taken as long long.