Multiplication Under Modulo
Sun Feb 06 2022 02:09:46 GMT+0000 (UTC)
Saved by @Uttam #java #mathematics #gfg #geeksforgeeks #multiplicationundermodulo
10. Multiplication Under Modulo You are given two numbers a and b. You need to find the multiplication of a and b under modulo M (M as 10^9+7). Example 1: Input: a = 92233720368547758 b = 92233720368547758 Output: 484266119 Explanation: Multiplication of a and b under modulo M will be 484266119. Example 2: Input: a = 1000000007 b = 1000000007 Output: 0 Explanation: Multiplication of a and b under modulo M is 0. Your Task: You don't need to read input or print anything. Your task is to complete the function multiplicationUnderModulo() that takes a and b as parameters and returns multiplication of a and b under modulo M. Expected Time Complexity: O(1) Expected Auxilliary Space: O(1) Constraints: 1 <= a,b <= 2^63 - 1
https://practice.geeksforgeeks.org/problems/multiplication-under-modulo/1/?track=DSASP-Mathematics&batchId=190
Comments