Given two positive integers num1 and num2, the task is to find the remainder when num1 is divided by num2.
Example 1:
Input:
num1 = 5
num2 = 3
Output:
2
Explanation:
The remainder after dividing 5 by 3 is: 2.
Example 2:
Input:
num1 = 5
num2 = 10
Output:
5
Explanation:
5 cannot be divided by 10 so it is 
the Remainder.
Your Task:  
You don't need to read input or print anything. Your task is to complete the function findRemainder() which takes two integer num1 and num2 as an input parameter and return the remainder when num1 is divided by num2.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
0 <= num1 <= 10^{6}
1 <= num2 <= 10^{6}

Source: geeksforgeeks | Difficulty: EASY
Tags: Number theory

Starter code: #User function Template for python3

class Solution:
    def findRemainder(self, num1, num2):
    	#code here 

Solutions:
class Solution:

	def findRemainder(self, num1, num2):
		c = num1 % num2
		return c


class Solution:

	def findRemainder(self, num1, num2):
		if num1 > num2:
			return num1 % num2
		else:
			return num1


class Solution:

	def findRemainder(self, num1, num2):
		return int(num1 % num2)


class Solution:

	def findRemainder(self, num1, num2):
		rem = num1 % num2
		return rem


class Solution:

	def findRemainder(self, num1, num2):
		n = num1 % num2
		return n


class Solution:

	def findRemainder(self, num1, num2):
		a = num1 % num2
		return a


class Solution:

	def findRemainder(self, num1, num2):
		k = num1 / num2
		while k >= 1:
			num1 = num1 - num2
			k = num1 / num2
		return num1


class Solution:

	def findRemainder(self, num1, num2):
		r = num1 % num2
		return r


class Solution:

	def findRemainder(self, num1, num2):
		R = num1 % num2
		return R


class Solution:

	def findRemainder(self, num1, num2):
		re = num1 % num2
		return re


import math

class Solution:

	def findRemainder(self, num1, num2):
		return num1 % num2


class Solution:

	def findRemainder(self, num1, num2):
		remain = num1 % num2
		return remain


class Solution:

	def findRemainder(self, num1, num2):
		ans = num1 % num2
		return ans


class Solution:

	def findRemainder(self, num1, num2):
		remainder = num1 % num2
		return remainder


class Solution:

	def findRemainder(self, num1, num2):
		n = divmod(num1, num2)
		return n[1]


class Solution:

	def findRemainder(self, num1, num2):
		x = divmod(num1, num2)
		return x[1]


class Solution:

	def findRemainder(self, num1, num2):
		rem = num1 % num2
		return rem
val = Solution()
val.findRemainder(5, 3)


class Solution:

	def findRemainder(self, num1, num2):
		rem = 0
		if num1 > num2:
			rem += num1 % num2
			return rem
		else:
			return num1


class Solution:

	def findRemainder(self, num1, num2):
		try:
			return num1 % num2
		except:
			return num1


class Solution:

	def findRemainder(self, num1, num2):
		ob = num1 % num2
		return ob


class Solution:

	def findRemainder(self, num1, num2):
		ele = num1 % num2
		return ele


class Solution:

	def findRemainder(self, num1, num2):
		k = num1 % num2
		return k


class Solution:

	def findRemainder(self, n1: int, n2: int):
		return n1 % n2


class Solution:

	def findRemainder(self, num1, num2):
		if num1 > num2:
			if num1 % num2 == 0:
				return 0
			elif num1 % num2 != 0:
				r = num1 % num2
				return r
		if num1 < num2:
			return num1


class Solution:

	def findRemainder(self, num1, num2):
		p = num1 % num2
		return p