modulo of order 10^n

how to calculate number modulo 109+7

2 Likes

By Using % operator…

ans=x%(pow(10,9)+7)

1 Like

my ans would be overflowed by then.

Use modulo properties.