思路:
这个题的难点就在于可能会超过int的范围,大概是希望我们能够使用一下高精度,毕竟是整数。
但是偷偷用double类型就能ac这个题。
代码:[double]
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
double a, b, c;
int n, i;
cin >> n;
for (i = 0; i < n; i++)
{
cin >> a >> b >> c;
cout << "Case #" << i + 1 << ": ";
if (a + b - c > 0.0000001)
cout << "true\n";
else cout << "false\n";
}
//while (1)
//{
//}
return 0;
}