京东24号运维工程师笔试

import sys
import math
n=int(input())
s=str(input())
now=[[False],0]
for i in s:
	***=[]
	for j in now:
		if (i.islower() and j[0]) or (i.isupper()) and not j[0] :
			***.append([not j[0],j[1]+1])#用caps
			***.append([j[0],j[1]+1])#用shift
		else:
			***.append([j[0],j[1]])
		***.sort(key=lambda x:x[1])
		joke=***[0][1]
	for j in ***:
		if joke==j[1]:
			now.append(j)
print(now[0][1]+len(s))
这是那个CapsLock和shift的那个
import sys
import math
n=int(input())
s=input().split(" ")
s=[int(i) for i in s]
f=s[:]
f.sort()
ans=0
ds={}
df={}
for i in range(len(s)):
	ds[s[i]]=True
	df[f[i]]=True
	if ds==df:
		ans+=1
		ds={}
		df={}
print(ans)这个是合唱团

均是全部ac,但是第一个时间很差#京东##运维工程师##笔试题目#
全部评论
运维开发工程师
点赞 回复 分享
发布于 2019-08-24 22:05
运维还有代码题?
点赞 回复 分享
发布于 2019-08-24 22:00
运维开发嘛铁汁
点赞 回复 分享
发布于 2019-08-24 21:59

相关推荐

不愿透露姓名的神秘牛友
07-10 11:55
点赞 评论 收藏
分享
码农索隆:单休一个月少休息4天,一年就是48天,平时节假日,别人3天假期,单休的两天
点赞 评论 收藏
分享
06-12 10:50
门头沟学院 Java
你的不定积分没加C:我怎么在学院群看到了同样的话
点赞 评论 收藏
分享
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-10 15:58
投个小米提前批试试水,先投一个岗位看看形势,不行就再沉淀一下投第二个岗位,莫辜负
Java抽象带篮子:我嘞个骚刚,已经开始研发6g了吗
投递小米集团等公司7个岗位
点赞 评论 收藏
分享
评论
点赞
4
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务