ProgrammingVery hard
What is 2^62 mod 1000000007?
- A. 145586001
- B. 145586003
- C. 49
- D. 145586002
Correct answer: D. 145586002
Binary exponentiation with 64-bit intermediates gives 2^62 mod p = 145586002 for p = 10^9 + 7.
More C Programming questions
- What is the total number of 1 bits in the binary representations of the integers 1 through 10?
- What is 1 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6 ^ 7 ^ 8 ^ 9 ^ 10 in C?
- What is the Hamming distance between 13 and 22 (the number of bit positions where they differ)?
- unsigned int a = 3, b = 5; printf("%u", a - b + 3); What is printed on a 32-bit platform?
- printf("%d", -1 < 1u); What is printed?
- What is the number of subsets of {0, 1, 2, 3, 4} whose element sum is even (the empty set counts)?