自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 201812-2 小明放学(python)

文章目录一、小明放学(续)1.思路2.源代码总结 一、小明放学(续) 1.思路 根据上面的图可以划分不同的情况,每种灯都有4种情况,具体情况看代码。 2.源代码 r,y,g = map(int,input().split()) time_all = r + y + g n = int(input()) res = 0 for i in range(n): k,t = map(int,input().split()) if k == 0: res += t elif

2020-11-18 10:21:57 172

原创 201812-1 小明上学(python)

文章目录一、小明上学1.源代码 一、小明上学 1.源代码 r,y,g = map(int,input().split()) k = int(input()) res = 0 for i in range(k): m,n = map(int,input().split()) if m == 0: res += n elif m == 1: res += n elif m == 2: res = res + n + r el

2020-11-07 23:58:02 240

原创 201909-2 小明种苹果(续)Python

文章目录一、小明种苹果(续)1.源代码总结 一、小明种苹果(续) 1.源代码 N = int(input()) res_drop = []#记录所有树的掉苹果情况 count_drop = 0 #记录掉的苹果数量 res = 0#记录所有的苹果数量 for i in range(N): temp = list(map(int,input().split())) abs_now = temp[1] mark = 0 #标记这颗树掉了苹果 ans = 0 #记录每一颗树的苹果数

2020-11-06 16:20:13 210 1

原创 201909-1 小明种苹果(python)

文章目录一、小明种苹果1.源代码 一、小明种苹果 1.源代码 N,M = map(int,input().split()) res = 0 ans = 0 max1 = 0 tes = 0 for i in range(N): temp = list(map(int,input().split())) res += temp[0] ans += abs(sum(temp[1:])) if abs(sum(temp[1:])) > max1: tes =

2020-11-05 22:19:52 205

原创 201912-1 报数(python)

文章目录一、报数1.题目描述2.源代码总结 一、报数 1.题目描述 2.源代码 m = int(input()) a = 0 b = 0 c = 0 d = 0 i = 1 while m: if i%4 == 1: if i%7 == 0 or '7' in str(i): a += 1 i += 1 continue elif i%4 == 2: if i%7 == 0 or '7

2020-11-04 22:45:09 150

原创 201912-2 回收站选址

文章目录一、回收站选址1.源代码总结 一、回收站选址 1.源代码 import sys m = int(input()) n = [] res = [0]*5 for i in range(m): m1,m2 = map(int,sys.stdin.readline().split()) n.append([m1,m2]) for i in n: if [i[0],i[1]+1] in n and [i[0],i[1]-1] in n and [i[0]+1,i[1]] in n a

2020-11-03 22:35:58 89 1

原创 202009-2 风险人群筛查

文章目录一、风险人群筛查1.题目描述2.源代码总结 一、风险人群筛查 1.题目描述 2.源代码 m = list(map(int,input().split())) res = {} for i in range(m[0]): temp = list(map(int,input().split())) s = 0 temp1 = [] for j in range(m[2]): if m[3] <= temp[j*2] <= m[5] and

2020-11-02 22:52:58 1118

原创 202009-1 称检测点查询

文章目录一、称检测点查询1.题目描述2.源代码总结 一、称检测点查询 1.题目描述 2.源代码 m = list(map(int,input().split())) res = [] dic1= {} #计算每个点到市民之间的距离 for i in range(m[0]): temp = list(map(int,input().split())) temp1 = (m[1]-temp[0])**2+(m[2]-temp[1])**2 res.append(temp1)#中间缓存

2020-11-01 22:05:24 303

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除