LeetCode第7题:Reverse Integer总结

题目

Reverse digits of an integer.

Example1: x = 123, return 321
Example2: x = -123, return -321

  • 大意:就是把数字倒过来。。。

思路和吐槽

只有吐槽:用Python做简直是太简单了,简直就是在作弊,,,如果我十天之内没用c++再做一遍,我肯定是白做了这道题

代码

Python

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注