- BC20270318's blog
__int128(输入输出)
- 2025-4-12 22:52:24 @
数据范围:-75618303760208547436305468318170713657~75618303760208547436305468318170713656
#include <bits/stdc++.h>
using namespace std;
void scan(__int128 &x)//输入
{
x=0;int f=1;char ch=getchar();
while (!isdigit(ch)){if (ch=='-')f=-1;ch=getchar();}
while(isdigit(ch)){x=x*10+ch-48;ch=getchar();}
x*=f;
}
void _print(__int128 x)
{
if(x>9) _print(x/10);
putchar(x%10 + '0');
}
void print(__int128 x)//输出
{
if(x<0)
{
x=-x;
putchar('-');
}
_print(x);
}