详细题目见788. Rotated Digits
Problem
输入一个整数N,输出从1到N所有的good number,good number的定义为经过每位数字翻转后的的数再组合起来依旧是一个正常的数,但值要和原来不同。
Example 1:
1 | Input: 10 |
Solution
将数字转换为它对应的数字,如果不能转换的位就设置为x,然后只要转换完后检查是否含有x或检查是否和原来一样就能知道这个数是不是符合要求的数。
代码
1 | class Solution: |
二十七杯酒
缺失模块。
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