-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEuler_Problem-039.py
79 lines (74 loc) · 1.08 KB
/
Euler_Problem-039.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
# transpiled with BefunCompile v1.3.0 (c) 2017
def td(a,b):
return ((0)if(b==0)else(a//b))
def tm(a,b):
return ((0)if(b==0)else(a%b))
x0=0
x1=0
x2=32
x3=6
x4=1000
x5=0
def _0():
global x2
global x3
global t0
x2=x3/3
t0=0
return 1
def _1():
global t0
global x2
t0=x2
return (2)if(x2!=2)else(4)
def _2():
global t0
global x2
global x3
t0=t0-1
x2=t0
return (1)if((tm(x3*(x3-(2*x2)),(x3-x2)*2))!=0)else(3)
def _3():
global x5
x5=x5+1
return 1
def _4():
global t0
global x5
global x0
t0=x5
return (8)if(x5>x0)else(5)
def _5():
global t0
global x3
global x4
t0=x3
return (7)if((x3-x4)!=0)else(6)
def _6():
global x1
print(x1,end=" ",flush=True)
return 9
def _7():
global t0
global x3
global x5
global x2
t0=t0+2
x3=t0
x5=0
x2=x3/3
t0=3
return 1
def _8():
global x0
global t0
global x1
global x3
x0=t0
x1=x3
return 5
m=[_0,_1,_2,_3,_4,_5,_6,_7,_8]
c=0
while c<9:
c=m[c]()