HackerRank Python - Mod Divmod




Read in two integers, a andb , and print three lines.
The first line is the integer division a//b (While using Python2 remember to import division from __future__).
The second line is the result of the modulo operator: a%b.
The third line prints the divmod of a and b.



  1. # Enter your code here. Read input from STDIN. Print output to STDOUT
  2. d = divmod(int(input()), int(input()))
  3. print(*d, d, sep='\n')




codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube