摘要:
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.class Solution {public: int romanToInt(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function int lastValue=0; int value; ... 阅读全文
posted @ 2013-09-02 23:34
懒猫欣
阅读(175)
评论(0)
推荐(0)
摘要:
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.Notes:It is intended for this problem to be specified vaguely (ie, no given input specs). You are respo 阅读全文
posted @ 2013-09-02 01:25
懒猫欣
阅读(177)
评论(0)
推荐(0)
摘要:
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonus points for you if you have already thought through this!If the integer's last digit is 0, what should the output be? ie, cas 阅读全文
posted @ 2013-09-02 00:09
懒猫欣
阅读(161)
评论(0)
推荐(0)
浙公网安备 33010602011771号