Visitar URL original
learning_python/solution/0600-0699/0660.Remove 9/README.md at main · bomeng/learning_python · GitHub
Skip to content

Latest commit

 

History

History
87 lines (51 loc) · 1.48 KB

README.md

File metadata and controls

87 lines (51 loc) · 1.48 KB
comments true
difficulty 困难
edit_url https://github.com/doocs/leetcode/edit/main/solution/0600-0699/0660.Remove%209/README.md
tags
数学

English Version

题目描述

从 1 开始,移除包含数字 9 的所有整数,例如 9,19,29,……

这样就获得了一个新的整数数列:1,2,3,4,5,6,7,8,10,11,……

给你一个整数 n,请你返回新数列中第 n 个数字是多少(下标从 1 开始)。

 

示例 1:

输入:n = 9
输出:10

示例 2:

输入:n = 10
输出:11

 

提示:

  • 1 <= n <= 8 * 108

解法

方法一

Python3

Java

C++

Go