سؤال

Is there an equivalent to Java's Bigint in C++ that can store the following number:

567014094304930933548155069494723691156768423655208899778686163624192868328194365094673392756508907687565332345345678900976543567890976543565789054335678097654680986564323567890876532456890775646780976543556789054367890765435689876545898876587907876535976565578907654538790878656543687656543467898786565457897675645657689756456578656456768654657898865567689656890795587907654678798765787897865654657897654678965465786867278762795432151914451557727529104757415030674806148138138281214236089749601911974949125689884222023119844272122501649909415937

I've looked at unsigned long long int but that is not nearly as big enough to store that.

هل كانت مفيدة؟

المحلول

نصائح أخرى

No. There is lot of libraries for BigInt C++. For example boost::multiprecision

There is no stadard C++ type for such a big numbers. You might need to use one of the library for big numbers: GMP, MAPM or bigint

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top