From d3123d66643332b23428728a53a9ca5de2b1b9a7 Mon Sep 17 00:00:00 2001 From: 643ba23685c1575eeb20855c <643ba23685c1575eeb20855c@devide> Date: Sun, 16 Apr 2023 07:28:36 +0000 Subject: [PATCH] Auto commit --- main.py | 17 ++++++++++++++++- test01.py | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 test01.py diff --git a/main.py b/main.py index 4c0c135..7f493ec 100644 --- a/main.py +++ b/main.py @@ -1 +1,16 @@ -print('欢迎来到 InsCode') \ No newline at end of file +def main(): + a = int(input("请输入a的值:")) + b = int(input("请输入b的值:")) + if b == 0: + print("data error") + return -1 + else: + c = a % b + while c != 0: + a = b + b = c + c = a % b + print(b) + + +main() \ No newline at end of file diff --git a/test01.py b/test01.py new file mode 100644 index 0000000..7f493ec --- /dev/null +++ b/test01.py @@ -0,0 +1,16 @@ +def main(): + a = int(input("请输入a的值:")) + b = int(input("请输入b的值:")) + if b == 0: + print("data error") + return -1 + else: + c = a % b + while c != 0: + a = b + b = c + c = a % b + print(b) + + +main() \ No newline at end of file -- GitLab