1 | 「无零整数」是十进制表示中 不含任何 0 的正整数。 |
先转化成最大的少一位的数字 $n_1$,和另外一个数字 $n_2$ 的和,这个时候只有 $n_2$ 中有可能含有 $0$, 如果 $n_2$ 中含有 $0$ 那么就在 $res[0]$ 的对应位上减去 $1$,这个时候不会在 $res[0]$ 上引入新的0,所以是正确的。
1 | class Solution { |
字符串判断写法
1 | class Solution { |
1 | 「无零整数」是十进制表示中 不含任何 0 的正整数。 |
先转化成最大的少一位的数字 $n_1$,和另外一个数字 $n_2$ 的和,这个时候只有 $n_2$ 中有可能含有 $0$, 如果 $n_2$ 中含有 $0$ 那么就在 $res[0]$ 的对应位上减去 $1$,这个时候不会在 $res[0]$ 上引入新的0,所以是正确的。
1 | class Solution { |
1 | class Solution { |
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true