128 bit integer?

Hello, I'm currently solving problem 13 on projecteuler.net and I have a problem. I need to store a variable which is greater than the maximum value for an unsigned long long(64-bit) integer. Is it possible to somehow define a 128-bit integer?
Use a bignit class. There are several available; boost has one implementation that supports some.

That said, note that you only need the first 10 digits of the numbers...
The thing about Project Euler is they're designed to make you think outside the norm to solve a problem. Obviously, that problem is simple if you can just sum all the numbers in a bigint variable type. Like... it's simple to the point of being boring. Summing numbers isn't much of a programming challenge.

The purpose of the problem is not to see whether or not you can find a lib that gives you a big enough data type, but rather is about trying to tackle the problem with a creative solution.


Try solving it (and for that matter, all project euler problems) without going to external libs, or using bignums, or what-have-you. Try to solve it within the limitations of the language.
Topic archived. No new replies allowed.