level 11
不是,很好奇。。。我写的要8ms别人是0ms 很好奇代码是怎样的。。。
2011年10月09日 13点10分
3
level 11
还有那个大数我用long long 和unsigned long long 提交上去直接错误 无语。
2011年10月09日 13点10分
4
level 11
(0<=a,b<=10^18)这种范围的两数相加呢?用什么...
我懂你的意思了,,,都是现在的伪并行运算惹的祸吧。。
2011年10月09日 13点10分
8
level 11
在我电脑上正常...
我贴下题目吧
Description
Calculate a+b again, but a and b will be huge. You can
assume that the answer will be fit in 64-bit integer.
Input
There will be several test case in the input files.
For every case, there are two integer a,b.(0<=a,b<=10^18)
Output
Output a+b.
Sample Input
1234567891011121314 14
13121110987
654321
1000000000 2000000000
Sample Output
2647689001998775635
3000000000
2011年10月09日 13点10分
10
level 11
#include <iostream>
using namespace std;
int main()
{
long long a,b;
cin >> a >> b;
cout << a + b << endl;
return 0;
}
代码是这个
2011年10月09日 14点10分
11
level 11
#include <iostream>
using namespace std;
int main()
{
__int64 a,b;
cin >> a >> b;
cout << a + b << endl;
return 0;
}
结果是Compile Error(?)。。。。。。。。。。。。
2011年10月09日 14点10分
13
level 11
突然看见你那题目是多组输入数据..你程序只处理了一组
2011年10月09日 14点10分
14
level 11
#include <iostream>
using namespace std;
int main()
{
long long a,b,c,d;
cin >> a >> b >> c >> d;
cout << a + b << endl;
cout << c + d << endl;
return 0;
}
wrong answer。。。
2011年10月09日 14点10分
16