标签:cout sso std number pac clu end i++ int
我校OJ迷路的小路痴为什么老是超时??(1043)
还有对2016取模??(1053)明明对了,还是说我错
(1053)
#include <iostream>
#include <cstring>
using
namespace
std;
char
a[305];
int
main()
{
while
(cin >> a)
{
int
k =
strlen
(a);
long
sum = 0;
for
(
int
i = 0; i < k; i++)
{
sum += a[i]-48;
sum = sum%2016;
sum = sum*10;
}
cout << sum/10 << endl;
}
return
0;
}
标签:cout sso std number pac clu end i++ int
原文地址:http://www.cnblogs.com/liuqiyu/p/6847651.html