Some Changes

This commit is contained in:
2024-02-09 04:24:01 +00:00
parent 5f02bf5efb
commit f1c124a2d5

View File

@@ -1,9 +1,19 @@
int fast_multiply(int a,int b,int c){
int res=0;
while(b){
if(b&1)res+=a,res%=c;
a+=a,a%=c;
b>>=1;
#include <bits/stdc++.h>
using namespace std;
int binary_multiplication(int a , int b,int M=(int)1e9+7){
int res = 0;
while( b ){
if( b&1 ) res += a , res %= M;
a = 2 * a ; a %= M:
b >>= 1;
}
return res;
}
int main(){
return 0;
}