Commit c7dbd0cd by BellCodeEditor

auto save

parent 21bf5373
Showing with 54 additions and 0 deletions
a=input("请输入月份:")
b=input("请输入年份:")
if int(a)>12 or int(a)<1 :
print("错误")
else:
if int(a)==2:
if (int(b)%4==0 and not(int(b)%100==0)) or int(b)%400==0:
print("29天")
else:
print("28天")
elif int(a)<8:
if int(a)%2==1:
print("31天")
else:
print("30天")
else:
if int(a)%2==1:
print("30天")
else:
print("31天")
x=int(input("输入数字"))
y=int(input("输入另一个数字"))
i=1
while i<=x or i<=y:
if x%i==0 and y%i==0 :
z=(i)
i+=1
print("最大公约数:"+str(z))
print("最小公倍数:"+str((x/z)*(y/z)*(z)))
m=int(input("输入数字:"))
n=int(input("输入另一个数字:"))
print(m**n)
\ No newline at end of file
k=input("输入月份")
if k==1 and k==3 and k==5 and k==7 and k==8 and k==10 and k==12:
print('31天')
elif k==4 and k==6 and k==9 and k==11:
print('30天')
else:
print('28天')
\ No newline at end of file
x=int(input('x'))
y=int(input('y'))
s=x*y
while x%y!=0:
x,y=y,(x%y)
else:
print(y)
print(s//y)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment