Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "string"
- #include "iostream"
- #include "bigint/NumberlikeArray.hh"
- #include "bigint/BigUnsigned.hh"
- #include "bigint/BigInteger.hh"
- #include "bigint/BigIntegerAlgorithms.hh"
- #include "bigint/BigUnsignedInABase.hh"
- #include "bigint/BigIntegerUtils.hh"
- using namespace std;
- int main() {
- //unsigned long int num = 13195;
- //unsigned long long int num = 600851475143;
- BigInteger num = 13195;
- int divider = 2;
- //num = 600851475143;
- while (1) {
- if ((num % divider) == 0) {
- cout << divider << 'n';
- num /= divider;
- }
- else
- divider++;
- if (num == 1)
- break;
- }
- }
- #include <iostream>
- int main()
- {
- long long num = 600851475143LL;
- std::cout << num;
- }
- unsigned long long int num = 600851475143ULL;
Add Comment
Please, Sign In to add comment