Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Java :: is the function same as method in java 
Java :: maths.abs function in java 
Java :: how to copy an object in java 
Java :: protobuf java gradle mvn 
Java :: difference between getcontext and getapplicationcontext in android 
Java :: split on . in java 
Java :: what is static method in oop 
Java :: hashmap put 
Java :: contient java 
Java :: java string stringbuilder array list tostring 
Java :: java program to convert milliseconds to minutes and seconds 
Java :: binary search algorithm in java 
Java :: java string 
Java :: generic method lambda java 
Java :: indexof list java 
Java :: can the method local inner class object access method local variables 
Java :: permutation and combination program in java 
Java :: how to reverse numbers in java 
Java :: java string loop backwards 
Java :: java random number generator 
Java :: remove element from char array java 
Java :: list of java 
Java :: how to convert double to int in java 
Java :: java finally block 
Java :: Java Method Create Basic 
Java :: java creating an arraylist 
Java :: how to get a set from a map in java 
Java :: Java Hasmap Remove Elements 
Java :: add items to linked list java 
Java :: types of exception in java 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =