Skip to content

Instantly share code, notes, and snippets.

@Mjkim-Programming
Created December 22, 2025 07:03
Show Gist options
  • Select an option

  • Save Mjkim-Programming/d7ef7a982738f548a4383e95d9a24f4c to your computer and use it in GitHub Desktop.

Select an option

Save Mjkim-Programming/d7ef7a982738f548a4383e95d9a24f4c to your computer and use it in GitHub Desktop.
__in128 template
#include <bits/stdc++.h>
#define ll long long
#define FASTIO \
cin.tie(NULL); \
ios::sync_with_stdio(false);
#define END return 0;
#define out cout <<
#define in cin >>
#define i128 __int128
using namespace std;
ostream& operator<<(ostream& os, i128 x) {
if(x == 0) {
os << '0';
return os;
}
if(x < 0) {
os << '-';
x = -x;
}
string s;
while(x > 0) {
s.push_back('0' + x % 10);
x /= 10;
}
reverse(s.begin(), s.end());
os << s;
return os;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment