Mod Divmod

  • + 0 comments

    Here's my code:

    First way
    a = int(input())
    b = int(input())
    c = divmod(a,b)
    print(c[0])
    print(c[1])
    print (c)
    
    Second way
    a,b = int(input()), int(input())
    c = divmod(a,b)
    print(c[0],c[1],c,sep='\n')