上代码:

#include <cmath>
class Solution {
public:
int reverse(int x) { long long temp=;
long long tx=llabs(x); while(abs(tx)>)
{
temp=temp*+tx%; tx=tx/;
}
if (temp> || temp<=-)
{
return ;
}
if (x>)
{
return (int)temp;
}
else
{
return -*(int)temp;
}
}
};

思路:简单

教训:1.<0的整数

   2.整数的边界

最新文章

  1. mysql-proxy 读写分离
  2. Lucene教程(转)
  3. Select语句也会引起死锁
  4. 使用 xtrabackup 进行MySQL数据库物理备份
  5. ionic cordova 热更新
  6. Codeforces Round #384 (Div. 2)B. Chloe and the sequence 数学
  7. C++ Static(静态成员)的作用总结
  8. C语言 文件操作2--文件缓存的理解
  9. BZOJ 2754 喵星球上的点名(后缀数组)
  10. grunt入门之grunt watch的使用
  11. 【iOS基础学习随笔-1】-基于对象的程序设计
  12. Codeforces Round #343 (Div. 2) C. Famil Door and Brackets
  13. C#如何判断质数(转)
  14. 在微信端使用video标签,播放结束会出现QQ浏览器推荐视频的解决办法(vue)
  15. Best time to buy and sell stocks IV
  16. vmware workstation14永久激活密钥分享
  17. [Luogu3242][HNOI2015]接水果
  18. 在CentOS 上搭建nginx来部署静态页面网站
  19. linux编译链接找不到库文件的解决方法。
  20. 设计模式笔记:策略模式(Strategy)

热门文章

  1. python selenium自动化测试报告
  2. Anaconda详细安装及使用教程(带图文)
  3. StaticInjectorError[Http]:
  4. tarjam 模板改编
  5. UVA1152_4 Values whose Sum is 0
  6. QT5.2 Assistant-设置应用程序图标
  7. export export-default import 使用场景
  8. 【目录】ASP.NET Core 基础教程
  9. go 区分指针
  10. Maven入门指南11:使用Nexus搭建Maven私服