__int128模板

#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
__int128 read()
{
    __int128 x = 0,f = 1; char c = getchar();
    while(c < '0' || c > '9') {if(c == '-') f = -1;c = getchar();}
    while(c >= '0' && c <= '9')
    {
        x = (x<<1) + (x<<3) + (c^48),c = getchar();
    }
    return x*f;
}
void write(__int128 x)
{
    if(x < 0) putchar('-'),x = -x;
    if(x >= 10)
    {
        write(x/10);
    }
    putchar(x%10 + '0');
}
int main()
{
    __int128 a,b;
    a = read(),b = read();
    write(a+b);
    return 0;
}



全部评论

相关推荐

10-28 17:30
已编辑
华东交通大学 Java
iori2333:这太正常了 我字节面了四五轮 没有一次是在官网投递 都是hr主动捞
秋招笔试记录
点赞 评论 收藏
分享
叁六玖:不买课还想秋招
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务