Solution to the problem Lead game is not getting accepted

Why is my code not getting accepted for lead game

#include <stdio.h>

int main(){
int n,i;
scanf("%d",&n);
int S[n],T[n],C[n];
for(i=0;i<n;i++){
scanf("%d",&S[i]);

scanf("%d",&T[i]);
 if(S[i]>T[i]){
   C[i]=S[i]-T[i];
 }
 else{
   C[i]=T[i]-S[i];
 }

}
int max=C[0];
int pos=0;
for(i=0;i<n;i++){
if(C[i]>max){
max=C[i];
pos=i;
}
}
int w=0;
for(i=0;i<n;i++){
if(i==pos){
if(S[i]>T[i]){
w=1;
break;
}
else{
w=2;
break;
}

}

}
printf("%d %d",w,max);

}
Can someone please help me out with it

2 34 is the answer what I am
getting

I know :slight_smile: It should be

2 50

Read the question very carefully! :slight_smile:

1 Like

Thank you

1 Like