摘要: a=eval(input()) n=eval(input()) m=0 sum=0 for i in range(1,n+1): m=m*10+2 sum+=m print("{}".format(sum)) 阅读全文
posted @ 2020-03-28 22:44 liuchun玲 阅读(105) 评论(0) 推荐(0) 编辑
摘要: a,b = map(int,input().split(' ')) if(a > 0 and b >0 and b % 2 == 0 and b-2*a>0): for x in range(1,a+1): y=a-x if 2*x+4*y==b: print("{} {}". format(x,y 阅读全文
posted @ 2020-03-28 22:43 liuchun玲 阅读(93) 评论(0) 推荐(0) 编辑
摘要: sum = 0 for n in range(1, 65): m = int(pow(2, n - 1)) sum = sum + m print("%d"%(sum)) 阅读全文
posted @ 2020-03-28 22:40 liuchun玲 阅读(638) 评论(0) 推荐(0) 编辑
摘要: a=eval(input()) b=eval(input()) import math x=(-b+pow(2*a*math.sin(math.radians(60))*math.cos(math.radians(60)),0.5))/(2*a) print(x) 阅读全文
posted @ 2020-03-28 22:39 liuchun玲 阅读(159) 评论(0) 推荐(0) 编辑
摘要: n=eval(input()) num=1 if n>0: for i in range(1,n+1): num=i*num print("%d"%(num)) 阅读全文
posted @ 2020-03-28 22:37 liuchun玲 阅读(118) 评论(0) 推荐(0) 编辑
摘要: a=5 b=8 c=3 m=pow(pow(b,2)-4*a*c,0.5) x=(-b+m)/2/a print("{}".format(x)) 阅读全文
posted @ 2020-03-28 22:36 liuchun玲 阅读(339) 评论(0) 推荐(0) 编辑
摘要: n=eval(input()) num=1 hebing=0 if n>0: for i in range(1,n+1): num=i*num hebing+=num print("%d"%(hebing)) 阅读全文
posted @ 2020-03-28 22:32 liuchun玲 阅读(332) 评论(0) 推荐(0) 编辑
摘要: n=eval(input()) num=1 if n>0: for i in range(1,n+1): num=i*num print("%d"%(num)) 阅读全文
posted @ 2020-03-28 22:29 liuchun玲 阅读(102) 评论(0) 推荐(0) 编辑
摘要: n=eval(input()) m=pow(2,n) print(m) 阅读全文
posted @ 2020-03-28 22:24 liuchun玲 阅读(270) 评论(0) 推荐(0) 编辑
摘要: a=eval(input()) b=eval(input()) if b!=0: print("{}".format(round(a/b,2))) else: print("除零错误") 阅读全文
posted @ 2020-03-28 22:22 liuchun玲 阅读(109) 评论(0) 推荐(0) 编辑
摘要: try: A=input() if A [-1] in ['c','C']: f=1.8*eval(A[0:-1])+32 print("{:.2f}F".format(f)) elif A [-1] in ['f','F']: c=(eval(A[0:-1])-32)/1.8 print("{:. 阅读全文
posted @ 2020-03-28 22:21 liuchun玲 阅读(348) 评论(0) 推荐(0) 编辑
摘要: from itertools import permutations n1 = input("") n2 = input("") n3 = input("") n4 = input("") n = n1+n2+n3+n4 sum = 1 for i in n: sum *= eval(i) if s 阅读全文
posted @ 2020-03-28 22:20 liuchun玲 阅读(134) 评论(0) 推荐(0) 编辑
摘要: n=eval(input()) for k in range(n): a=eval(input()) if a%2!=0: min=max=0 else: j=a/4 i=a%4/2 min=i+j max=a/2 print("%d %d"%(min,max)) 阅读全文
posted @ 2020-03-28 22:19 liuchun玲 阅读(89) 评论(0) 推荐(0) 编辑
摘要: import turtle class Stack: def __init__(self): self.items = [] def isEmpty(self): return len(self.items) == 0 def push(self, item): self.items.append( 阅读全文
posted @ 2020-03-28 22:17 liuchun玲 阅读(73) 评论(0) 推荐(0) 编辑