hey i get the result as wrong answer in codechef for my code but while executing the code in my compiler it runs good and gives correct answer
#include <iostream>
using namespace std;
int main() {int t,n,a[10],sum,j,i,temp=1000; cin>>t; while(t--) {
cin>>n;
for(i=0;i<n;i++)
{cin="">>a[i]; }
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{ sum=a[i]+a[j];
if(sum<temp)
temp=sum;
}
} cout<<temp<<endl;
} return 0; }
whats wrong i it?