找人就找Aker level
获赞
6
粉丝
3
关注
4
看过 TA
1
广东外语外贸大学
2021
数据分析师
IP属地:广东
垂死病中惊坐起
私信
关注
#携程笔试# 半凉经携程21届春招数据分析专业笔试一共2道题:Python+SQL,python的是求数字d的平方差分解,SQL是检索起始站和终点站的一览表。python的可以直接三层for循环+if判断完成,通过代码如下:d=int(input())count=0for a in range(d):    if a*a<d:        for b in range(d):            if a*a+b*b<d:                for c in range(d):                    if a*a+b*b+c*c==d:                        count+=1                        breakif count==0:    print(0)else:    print(1)SQL的难在于如何判断“上海-北京”和“北京-上海”是同一路线或者车次,当时没有解出来。table名:train_stopstations ,原始表格如下图:看了其他贴的评论,方知解答思路如此简单明了:SELECT t1.station as deo,t2.station as arr,t1.trainnumber from train_stopstations as t1inner join train_stopstations as t2on t1.trainnumber=t2.trainnumberand t1.no<t2.no
投递携程等公司10个岗位
0 点赞 评论 收藏
分享

创作者周榜

更多
关注他的用户也关注了:
牛客网
牛客企业服务