diff --git a/角谷猜想.py b/角谷猜想.py new file mode 100644 index 0000000..8190356 --- /dev/null +++ b/角谷猜想.py @@ -0,0 +1,13 @@ +def jiaogu(n): + if n==1: + print("END") + return 1 + if n%2==0: + print(n,"/",2,"=",n//2,sep="") + jiaogu(n//2) + else: + print(n, "*", 3, "+",1,"=", n*3+1, sep="") + jiaogu(n*3+1) + +n=int(input()) +jiaogu(n) \ No newline at end of file