repl.it
@tomnagel/

Wiskunde dag snelle versie

Python

fuck u

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
a = int(input("number a"))
b = int(input("number b"))
import math
c = 0  
while True:
  if a == 0:
    print(b)
    break
  elif b == 0:
    print(a)
    break
  elif a > b:
    c = math.floor(a / b)
    a = a - b * c
  elif b > a:
    c = math.floor(b / a)
    b = b - a * c
print(a, b)


   
Fetching token
?