TOPIC
Erro de Runtime, mas retorna tudo certo.
dl-maracanau asked 6 years ago
Código em C do Problema 1914:
include
include
int main(){
int k , N , num1 , num2;
char J1[100] , E1[5] , J2[100] , Res[5];
scanf("%i",&N);
for(k=0; k<N; k++){
scanf("%s %s",J1,E1);
scanf("%s %*s",J2);
scanf("%i %i",&num1,&num2);
if((num1+num2)%2==0)
strcpy(Res,"PAR");
else
strcpy(Res,"IMPAR");
if(strcmp(Res,E1)==0)
printf("%s\n",J1);
else
printf("%s\n",J2);
}
return 0;
}
Qual o problema de runtime deste código? Ele está retornando tudo direito.