Mod Divmod

Sort by

recency

|

371 Discussions

|

  • + 0 comments

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

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

  • + 0 comments
    if __name__ == "__main__":
        a, b = [int(input()) for _ in range(2)]
        div, mod = a//b, a%b
        print(div)
        print(mod)
        print((div, mod))
    
  • + 0 comments
    a, b = int(input()), int(input())
    print(f"{a//b}\n{a%b}\n{divmod(a, b)}")
    
  • + 0 comments
    a = int(input())
    b = int(input())
    
    print(a // b, a % b, divmod(a, b), sep="\n")
    
  • + 0 comments

    a = int(input())

    b = int(input())

    result = divmod(a, b)

    print(result[0])

    print(result[1])

    print(result)