版本比较
int128的用法
正文
增加 6 行删除 6 行
1234456678910111213131415161717181920212222232425267 行未改动3435363738383940#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 - 48 ch = 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;}