Taking large integer input in c++

I want to take integer input of size 10^18. Is it possible to take such large input in C++. I am solving a question in which Constraints demands the input to be of size 10^18 and another input to be a size of 10^9.

Use int64_t instead of long long int.
Hope it works.

3 Likes

Is there any way by which i could take an input of order 10^19.

Codechef supports __int128. I don’t know how to take it as input. But you can take input as a string and then store the result in __int128

1 Like