What is the best way to handle large numeric inputs in C++ (for example 10^100
)?
For algorithms I usually switch over to ruby and I sometimes use strings.
Any other good methods?
bigintegerc++largenumber
What is the best way to handle large numeric inputs in C++ (for example 10^100
)?
For algorithms I usually switch over to ruby and I sometimes use strings.
Any other good methods?
Best Solution
It sounds like you're looking for a way to enter Arbitrary Precision numbers. here are two libraries you could use: GMP and MAPM