版本比较
int128的用法
正文
增加 6 行删除 6 行
12345678910111213141516171819202122232425267 行未改动34353637383940#include<iostream>using namespace std;__int128 read(){__int128 x = 0, f = 1;char ch;ch = getchar();while(ch < '0' || ch > '9') {if(ch == '-') f = -f;ch = getchar();}while(ch >= '0' && ch <= '9') {x = (x << 1) + (x << 3) + (ch ^ 48); // x = x * 10 + ch - 48ch = getchar();}return x * f;}void write(__int128 x) {if(x < 0) putchar('-'),x = -x;if(x > 9) {write(x / 10);}7 行未改动}for(int i = 0; i < 5; i++) {write(a[i]);cout << " ";}return 0;}12345678910111213141516171819202122232425267 行未改动34353637383940#include<iostream>using namespace std;__int128 read(){__int128 x = 0, f = 1;char ch;ch = getchar();while(ch < '0' || ch > '9') {if(ch == '-') f = -f;ch = getchar();}while(ch >= '0' && ch <= '9') {x = (x << 1) + (x << 3) + (ch ^ 48); // x = x * 10 + ch - 48ch = getchar();}return x * f;}void write(__int128 x) {if(x < 0) putchar('-'),x = -x;if(x > 9) {write(x / 10);}7 行未改动}for(int i = 0; i < 5; i++) {write(a[i]);cout << " ";}return 0;}