http://acm.hdu.edu.cn/showproblem.php?pid=2096
注意int型,a不超过int型所表示的最大整数,b也不超过,但是a+b可能超过!
#include <iostream>
using namespace std;
int main()
{
int T;
cin>>T;
while(T--){
int a,b;
cin>>a>>b;
cout<<(a%100+b%100)%100<<endl;
}
return 0;
}
http://acm.hdu.edu.cn/showproblem.php?pid=2096
注意int型,a不超过int型所表示的最大整数,b也不超过,但是a+b可能超过!
#include <iostream>
using namespace std;
int main()
{
int T;
cin>>T;
while(T--){
int a,b;
cin>>a>>b;
cout<<(a%100+b%100)%100<<endl;
}
return 0;
}