66. Plus One
来源:互联网 发布:淘宝零点抢购怎么抢 编辑:程序博客网 时间:2024/05/29 12:02
Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.
You may assume the integer do not contain any leading zero, except the number 0 itself.
The digits are stored such that the most significant digit is at the head of the list.
每个非负整数用数组表示 高位的在前边
code:
class Solution(object):
def plusOne(self, digits):
"""
:type digits: List[int]
:rtype: List[int]
"""
return [int(x) for x in str(int("".join([str(x) for x in digits]))+1)]
阅读全文
1 0
- [LeetCode]66.Plus One
- LeetCode --- 66. Plus One
- [Leetcode] 66. Plus One
- [leetcode] 66.Plus One
- 66. Plus One
- 66. Plus One
- [leetcode] 66. Plus One
- Leetcode-66. Plus One
- 【leetcode】66. Plus One
- 66. Plus One
- 66. Plus One LeetCode
- 66. Plus One
- 66. Plus One
- 66. Plus One
- 66. Plus One
- 66. Plus One
- 【LeetCode】66. Plus One
- [LeetCode]66. Plus One
- EF中System.Data.Entity.Internal.AppConfig的类型初始值设定项引发异常
- docker 配置可以运行spark的容器并运行
- select2下拉菜单重置
- MySQL出现乱码的原因
- 『ORACLE』 SQL语句简单使用(一)(11g)
- 66. Plus One
- 海量数据排序——如果有1TB的数据需要排序,但只有32GB的内存如何排序处理?
- MapReduce 2 的工作机制
- java之非阻塞IO(NIO)
- UVA 11806 Cheerleaders(容斥原理)
- SQL中的case when then else end用法
- Laravel [1045] 解决方法 Access denied for user 'homestead'@'localhost'
- libevent源码学习(四)定时器Timer
- NGINX反向代理服务器