当前位置:网站首页>Palindromes (simple version)
Palindromes (simple version)
2022-06-22 22:40:00 【Douglas_ LT】
A daily topic ing, Today is a simple question Power button 9. Palindrome Number
class Solution {
public:
bool isPalindrome(int x) {
string a;
int i=0;
if(x<0)
return false;
while(x!=0)
{
a[i++]=x%10+'0';
x=x/10;
}
for(int j=0,k=i-1;j<k;j++,k--)
{
if(a[j]!=a[k])
return false;
}
return true;
}
};
边栏推荐
- shell(34) : 時間
- 二级造价工程师考前必备15个知识点来了!祝你旗开得胜!
- How to use the data dictionary function in the low code platform of the Internet of things?
- Next permutation [give play to subjective initiative to discover laws]
- Vs code one key sorting shortcut
- Huawei cloud recruits partners in the field of industrial intelligence to provide strong support + commercial realization
- Lua-- use of data types, variables, loops, functions and operators
- Las point cloud data thinning in ArcGIS
- Implementation of depth traversal adjacency table in Figure 6-7
- The required reading for candidates | PMP the test on June 25 is approaching. What should we pay attention to?
猜你喜欢

5 minutes to quickly launch web applications and APIs (vercel)
A hundred lines of code to realize reliable delay queue based on redis

欧洲的龙之城|国家地理全球最浪漫最安全的目的地

redis 报错解决与常用配置

腾讯云上传文件出现的问题:in a frame because it set ‘X-Frame-Options‘ to ‘deny‘.

How to use the data dictionary function in the low code platform of the Internet of things?
Solution to cache inconsistency

SPA项目开发之登录注册

In the middle of the year, we will promote the integration of worry free, and the value-added package will be reduced by 6

Rapideye, spot satellite remote sensing image data
随机推荐
Task management of embedded development foundation (thread management)
[geometric vision] 4.2 piecewise linear transformation
【知乎知识主推荐】 无人机中的城堡- 专注于无人机在不同技术领域的应用
sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
How much do you know about the cause of amplifier distortion?
SPA项目开发之首页导航+左侧菜单
腾讯云上传文件出现的问题:in a frame because it set ‘X-Frame-Options‘ to ‘deny‘.
322.零钱兑换
In 2022, the "product innovation and achievement transformation" training camp of Chaoyang District Science and technology innovation class was successfully completed
MySQL multi table operation
volume rendering
In the third week of June, the main growth ranking list (BiliBili platform) of station B single feigua data up was released!
Las point cloud data thinning in ArcGIS
Analysis of open API design specification
CSV add a new column
shell(34) : 時間
Several ways of redis persistence -- deeply parsing RDB
立体渲染
Developing salary management system based on C language course paper + source code and executable EXE file
Basic MySQL database operations