__int128大约存放long long 的1.3倍,想要读入和输出必须用快读快写。
#include<bits/stdc++.h>
using namespace std;
void write(__int128 x)
{
if (x > 9)
write(x / 10);
putchar(x % 10 + 48);
}
__int128 read()
{
__int128 x = 0;
char c = getchar();
while (c < 48 || c > 57)
c = getchar();
while (c > 47 && c < 58)
x = (x << 1) + (x << 3) + c - 48, c = getchar();
return x;
}
signed main(){
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
__int128 s=read();
write(s);
}