题解 | #扑克牌大小#

扑克牌大小

https://www.nowcoder.com/practice/d290db02bacc4c40965ac31d16b1c3eb

lis = ['3','4','5','6','7','8','9','10','J','Q','K','A','2','joker','JOKER']

p1,p2 = input().split('-')

p1,p2 = p1.split(),p2.split()

if len(p1)==len(p2):

    if lis.index(p1[0])>lis.index(p2[0]):

        print(' '.join(p1))

    else:

        print(' '.join(p2))

elif len(p1)==2 and p1[0].lower()=='joker':

    print(' '.join(p1))

elif len(p2)==2 and p2[0].lower()=='joker':

    print(' '.join(p2))

elif len(p1)==4:

    print(' '.join(p1))

elif len(p2)==4:

    print(' '.join(p2))

else:

    print('ERROR')

全部评论

相关推荐

今天 20:51
门头沟学院 golang
点赞 评论 收藏
分享
03-02 10:51
邵阳学院 Java
红鲤鱼与绿鲤鱼i:看了你的头像不像找工作,像在找妹子
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务