[Leetcode]009.Palindrome Number
2024-08-29 18:03:11
public class Solution {
public boolean isPalindrome(int x) {
if (x<0 || (x!=0 && x%10==0)) return false;
int div = 1;
while(x/10>=div)
div *= 10;
while(x>0)
{
if(x/div!=x%10)
return false;
x = (x%div)/10;
div /= 100;
}
return true;
}
}
最新文章
- Azure PowerShell (2) 修改Azure订阅名称
- css3 animation动画特效插件的巧用
- Inno Setup 下载安装
- mysql 密码重置
- 练习--LINUX进程间通信之无名管道PIPE
- 多媒体应用-swift
- DataGrid( 数据表格) 组件[7]
- 使用md5判断网站内容是否被篡改
- Ubuntu 16.04 搭建Android开发环境
- SQLAlchemy入门
- ASP.NET WebApi 使用Swagger生成接口文档
- 实现定时备份mysql数据库并把备份数据库邮件发送
- CentOS7 安装极点五笔输入法
- opencv关于Mat类中的Scalar()---颜色赋值
- Ubuntu16.04 安装Tensorflow1.7过程记录二:安装CUDA及Tensorflow
- keras神经网络三个例子
- Random Maze HDU - 4067(预定义状态建边(贪心建边))
- .net dll反编译出现的问题,以及部分修复的方法
- Alpha阶段敏捷冲刺(六)
- Intellij IDEA 编译等级与源代码等级不一致问题
热门文章
- 浅谈vue路由原理
- 训练集、测试集loss容易出现的问题总结
- VBScript 内置函数
- 作为.NET程序员,您需要IronPython么?
- sessionStorage,localStorage,cookies
- Operating System-进程/线程内部通信-竞争条件(Race Conditions)
- Maven(3)-利用intellij idea创建maven web项目
- man syslog | col -b >; syslog.txt
- C#调用ODBC连接SQL Server数据库的存储过程
- #410div2D. Mike and distribution