跳到正文

个人记录

__int128のinput&output

gyf_QAQ约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年3月19日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1
C++
#include <bits/stdc++.h>
using namespace std;
__int128 input(){
    __int128 x=0,f=1;
    char ch=getchar();
    while (ch<'0'||ch>'9'){
        if(ch=='-'){
            f=-1;
        }
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        x=x*10+ch-'0';
        ch=getchar();
    }
    return x*f;
}
void output(__int128 x){
    if(x>=10){
        output(x/10);
    }
    int t=x%10;
    cout<<t;
}
int main()
{

    return 0;
}
原文