Skip to content

Latest commit

 

History

History
49 lines (22 loc) · 642 Bytes

File metadata and controls

49 lines (22 loc) · 642 Bytes

中文文档

Description

Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.

Example:

Input: 13

Output: 6 

Explanation: Digit 1 occurred in the following numbers: 1, 10, 11, 12, 13.

Solutions

Python3

Java

...