京东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 21:59
运维还有代码题?
点赞 回复
分享
发布于 2019-08-24 22:00
英特尔
校招火热招聘中
官网直投
运维开发工程师
点赞 回复
分享
发布于 2019-08-24 22:05

相关推荐

点赞 3 评论
分享
牛客网
牛客企业服务