#include<stdio.h>
int main()
{
int a,b;int i,T;
scanf("%d",&T);
for(i=1;i<=T;i++)
{
scanf("%d%d",&a,&b);
printf("%d\n",a+b);
}
//printf("\n");//必须去掉,否则PE(presentation error)
return 0;
}

 //pe代表结果正确,只是输出格式不对

 

 

 

 

 

这样也对

#include<stdio.h>
int main()
{
int a,b;int i,T;
while(scanf("%d",&T)!=EOF)
{
for(i=1;i<=T;i++)
{
scanf("%d%d",&a,&b);
printf("%d\n",a+b);
}
}

return 0;
}

 




相关文章:

  • 2021-07-12
  • 2021-12-23
  • 2021-10-20
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-08-14
猜你喜欢
  • 2021-09-02
  • 2021-12-19
  • 2021-07-29
  • 2022-02-11
  • 2021-12-08
  • 2022-12-23
  • 2021-05-29
相关资源
相似解决方案