0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 20:56:37 +00:00

Add __int128 Utils

This commit is contained in:
Baoshuo Ren 2021-07-10 10:37:49 +08:00 committed by Baoshuo Ren
parent f1c976012c
commit 26ce4f0658
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

13
templates/int128.h Normal file
View File

@ -0,0 +1,13 @@
#include <algorithm>
#include <ostream>
#include <string>
std::ostream& operator<<(std::ostream& __ostream, __int128 __n) {
std::string __o;
while (__n) {
__o.push_back(__n % 10 + '0');
__n /= 10;
}
std::reverse(__o.begin(), __o.end());
return __ostream << __o;
}