1000
#include<iostream>
using namespace std;
int main()
{
int a, b;
cin >> a;
cin >> b;
cout << (a+b) << endl;
return 0;
}
T1001
#include<iostream>
#include<stdlib.h>
using namespace std;
void main()
{
double R;
int n;
double product = 1;
cin >> R >> n;
while(n)
{
if(n&1)
{
product *= R;
}
R *= R;
n >>= 1;
}
if ((int)product == product)
printf("%u", (int)product);
else
printf("%f", product);
system("pause");
}
但是visualC++中运行,结果精度不够