vipkid 大数据开发笔试编程题

题目很简单,编程的第一个sql只有50%通过率,交了卷问了牛客AC的大佬才知道除了分数排名还要考虑交卷时间。
还是自己没考虑全面,发帖当作一个教训吧。
贴一下两个题的代码:
第一题:
select st_id,st_name from
(select *,sum(score) as sum_score,
strftime ('%s', max(start_time)) - strftime('%s', min(start_time)) as use_time
from S group by st_id order by sum_score,use_time)
limit 1

第二题:
s=input().split()
s[-1]+=","
count=0
res=[]
for i in s:
    if "-"+i in s and i not in res:
        count+=1
        res+=[i,"-"+i]
print(count)


#VIPKID##大数据开发工程师##题解#
全部评论

相关推荐

07-25 10:39
门头沟学院 Java
点赞 评论 收藏
分享
05-29 20:34
门头沟学院 C++
KarlAllen:得做好直接春招的准备。学历差的话,一是面试要求会比学历好的严格不少,二是就算面试通过了也会被排序。总之暑期和秋招对于学历差的就是及其不友好
无实习如何秋招上岸
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
05-29 20:12
点赞 评论 收藏
分享
评论
1
4
分享

创作者周榜

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