+ 3

How to take input of an integer consist of 30+ digit ?

Cpp

3rd Oct 2017, 7:39 AM
Devesh Shakya
Devesh Shakya - avatar
2 Answers
+ 15
The maximum length of a long long integer type (which is the largest built-in integer type) can be shown by the following snippet. For dealing with +30 digits you should use external libraries like Boost [https://stackoverflow.com/questions/15400031/c-what-variable-type-for-extremely-big-integer-numbers] #include <limits> .... cout << numeric_limits<long long>::max(); // 9223372036854775807
3rd Oct 2017, 8:19 AM
Babak
Babak - avatar
+ 3
Split it into 2 outputs and explain it explicitly. The SoloLearn compiler is really limited, deal with it!
3rd Oct 2017, 7:54 AM
Dapper Mink
Dapper Mink - avatar