ProgrammingVery hard
With 64-bit arithmetic, what is (10^9 x 10^9) mod (10^9 + 7)?
- A. 1
- B. 7
- C. 1000000007
- D. 49
Correct answer: D. 49
10^18 mod (10^9 + 7) = 49, since 10^9 is congruent to -7 and (-7)^2 = 49.
More C Programming questions
- What is the value of x & (x - 1) for x = 0b10110100 in binary as a decimal?
- How many integers in the range 0 to 255 have both bit 7 and bit 0 set?
- What is the number of trailing zero bits in 40 (binary 101000)?
- What is -7 / 4 in C?
- unsigned char c = 0xF0; c |= 0x0F; c <<= 1; printf("%d", c); What is printed?
- What is the value of 1u << 31 >> 31 in C?