此题还是一道简单的程序应用题!!!此题注意一下,先对每个输入的A和B对100求一下余数,否者的话,
当A和B取很大的值的时候他们的和就有可能超出int类型,这时你在对100取余,你就将得到错误的结果,
当然跟无法AC了!!!哈哈!!!
祝你好运!!!
#include<iostream>
using namespace std;
int main()
{
 int T;
 int A,B;
 cin>>T;
 while(T--)
 {
        cin>>A>>B;
 cout<<(A%100+B%100)%100<<endl;
}
return 0;
}

 
   
  

相关文章:

  • 2021-09-01
  • 2021-09-01
  • 2021-09-01
  • 2021-09-01
  • 2021-09-01
  • 2021-09-01
  • 2021-09-01
  • 2021-09-01
猜你喜欢
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2021-04-26
  • 2021-09-01
相关资源
相似解决方案