1LL 先转成大类型
运行下面这段程序:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a = 50000;
long long x = 1LL * a * a;
cout << x << endl;
}
(本题用 g++ -std=c++17 -O0 编译。)
运行下面这段程序:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a = 50000;
long long x = 1LL * a * a;
cout << x << endl;
}
(本题用 g++ -std=c++17 -O0 编译。)
全部评论