can’t idetify the error
Getting 2 test cases fail
your code is correct but you are not taking input correctly ,question expects you to take test case which you are not taking into consideration
i have corrected your code :
mark your doubt as resolved if no further querries
i’m sorry but i needed assistance on this code. it was my mistake. please help. https://ide.codingblocks.com/s/243348
make you int as long long as n can be as large as 10^5 and a[i] is also large so whenever you are computing sum it will can integer overflow
corrected code : -https://ide.codingblocks.com/s/243489