回文數
bool isPalindrome(int x)
{
if(x<0)
return false;
long y=0;
int z=x;
while(z!=0)
{
y=y*10+z%10;
z/=10;
}
if(y==x)
return true;
return false;
}
Leetcode third day
最新推荐文章于 2024-06-14 10:48:09 发布
博客围绕LeetCode展开,虽未给出具体内容,但推测是关于LeetCode的日常练习分享,涉及算法解题等信息技术相关内容。
500

被折叠的 条评论
为什么被折叠?



