Mod Divmod - Python Math Solution

Mod Divmod - Python Math Solution

Instructor-svgAl-Mamun Sarkar
Mar 26 , 2020

Mod Divmod - Python Math Solution. The following shows how to solve the HackerRank Mod Divmod Python Math problem.

Code:

a = int( input() )
b = int( input() )

print(a//b)
print(a%b)
print( divmod(a, b) )

 

Test Input:

177
10

Test Output:

17
7
(17, 7)
  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram