Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

mod 10e9+7 in java

mod = 1000000007;

int a = (b * c)%mod; // It might overflow even we did mod;

int a =  (int)((1LL * b * c)%mod); // its correct
 
PREVIOUS NEXT
Tagged: #mod #java
ADD COMMENT
Topic
Name
7+3 =