class Solution:
def judgeCircle(self, moves):
"""
:type moves: str
:rtype: bool
"""
m=moves.count("U")
n=moves.count("D")
j=moves.count("L")
k=moves.count("R")
return m==n and j==k
leetcode - 657 - 机器人能否返回原点
猜你喜欢
转载自blog.csdn.net/hustwayne/article/details/83544960
今日推荐
周排行