1.cin>>hex 以十六进制输入
cout<<hex<<sum;
十六进制负数不能直接输出
所以 输出时 cout<<"-"<<-sum<<endl;
2.mod数学上为 “%”
3.在#include<algorithm>中的sort函数
若要降序 则重写cmp函数(自定义类型必须重写cmp)
如:
bool cmp(int a,int b)
{
return a>b;
}
sort(a,a+m,cmp);
4.int的最大值为32767. 2 五位数
long long int 的最大值为9,223,372,036,854,775,807