摘要: class Solution {public: bool isPalindrome(int x) { long long int ans=0; int y=x; while(y) { ans=ans*10+y%10;... 阅读全文
posted @ 2015-06-05 22:26 varcom 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1 int max_value=2147483647; 2 int min_value=-2147483648; 3 class Solution { 4 public: 5 int myAtoi(string str) { 6 long long int ans=0; 7... 阅读全文
posted @ 2015-06-05 21:44 varcom 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 typedef long long lld; 2 lld mn=-((lld)1mx||ansmx||ans<mn)14 ans=0;15 return (int)ans;16 }17 };View Code 阅读全文
posted @ 2015-06-05 15:41 varcom 阅读(122) 评论(0) 推荐(0) 编辑