Large number problem

I am a newbie and I need help in dealing with large numbers in programs.
I googled the problem and there were a number of libraries…but i don’t know how to use them in any program that I write.

The FAQ section here suggests that I should write my own functions to handle large numbers as strings…
I want to know…is that how everyone here does it… Is that the only way…in every programming language?

Please do help. TIA. :slight_smile:

it depends upon the programming language that u r using…Assuming that u are using C or C++,taking the input as string is the best way to handle input data consisting of 1000 digits,10^5 digits.long long int allows u to take input as large as 10^18…but betond that taking input as string is the best method.

1 Like

You should write your own functions to handle large numbers in certain languages like C, C++. Also, Python can handle large numbers (greater than maximum limit allowed by built in data types in C, C++).

1 Like

yes as said earlier the languages like c++ which does not have built in datatype to handle the number greater than 64 bit but u can solve pretty much all the problems without writing a bigInteger class
as always there is mudulus operation involved…but chill u can use other languages in worst case ( java has built in class for handling Big integers).

In the last 2 Long contests (excluding the one running right now), there were problems which required bigints. So it is important.

//