#include <bits/stdc++.h>
using namespace std;
int main()
{
unsigned long long n = 304509,p = 54,ans;
ans = pow(2,54) - n;
cout << ans;
return 0;
}
输出为:18014398509177476 是错的
而改为
#include <bits/stdc++.h>
using namespace std;
int main()
{
unsigned long long n = 304509,p = 54,ans;
ans = pow(2,54);
cout << ans - n;
return 0;
}
输出为:18014398509177475 就对了
能不能告告我为啥