Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <cstdlib>
- unsigned short int sum, modulo, base;
- unsigned long long int n;
- bool current;
- bool baseConvertDigitMod(unsigned long long int number, unsigned short int baseTo)
- {
- sum = 0;
- while (number > 0)
- {
- modulo = number%baseTo;
- sum += modulo;
- number /= baseTo;
- }
- if ((sum & 1)== 0)
- return false;
- else return true;
- }
- int main()
- {
- n = 64;
- for (n = 60000000000; n < 80000000000; n += 2)
- {
- current = true;
- for (base = 2; base < 100; base+=2)
- {
- if (baseConvertDigitMod(n, base))
- break;
- }
- if (base > 50)
- {
- printf("%15llu %hu \n", n,base-1);
- }
- }
- printf("%s", "Done!");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement