gistlib
main.pya = 5 b = 3 m = 7 # Addition print((a + b) % m) # Output: 1 # Subtraction print((a - b) % m) # Output: 2 # Multiplication print((a * b) % m) # Output: 1 # Division print((a // b) % m) # Output: 2 # Exponentiation print(pow(a, b, m)) # Output: 6 255 chars19 lines
a = 5 b = 3 m = 7 # Addition print((a + b) % m) # Output: 1 # Subtraction print((a - b) % m) # Output: 2 # Multiplication print((a * b) % m) # Output: 1 # Division print((a // b) % m) # Output: 2 # Exponentiation print(pow(a, b, m)) # Output: 6
gistlibby LogSnag