fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using ll = long long;
  4.  
  5. __int128 kek = -(__int128)1e18L * (__int128)1e18L;
  6.  
  7. namespace std {
  8. std::string to_string(__int128 val) {
  9. bool neg = false;
  10. if (val < 0) neg = true, val = -val;
  11. auto high = ll(val / (__int128)1e18L);
  12. auto low = ll(val - (__int128)1e18L * high);
  13. std::string res;
  14. if (neg) res += '-';
  15. if (high > 0) {
  16. res += std::to_string(high);
  17. std::string temp = std::to_string(low);
  18. res += std::string(18u-temp.size(),'0');
  19. res += temp;
  20. } else {
  21. res += std::to_string(low);
  22. }
  23. return res;
  24. }
  25. }
  26.  
  27. int main() {
  28. std::cout << std::to_string(kek) << std::endl;
  29. return 0;
  30. }
Success #stdin #stdout 0s 4168KB
stdin
Standard input is empty
stdout
-1000000000000000000000000000000000000