Introduction - If you have any usage issues, please Google them yourself
小明上“算法设计与分析”的课程很无聊,就在白纸上写下一串连续的整数:1、2、3、4、5、6、7、8、9、10…突然,他想到一个小游戏,可以统计这些数字中0到9的出现次数(如1到10共有2个1,其他数字均出现1次),并且考虑用算法来实现 。
①若范围是100,可如何实现?
Xiao Ming on the algorithm design and analysis of the course is boring, on the white paper to write a string of consecutive integers: 1, 2, 3, 4, 5, 6, 7, 9, 10... Suddenly, he thought of a small game, you can count the number of 0 to 9 of the number of occurrences (such as the number of 1 to 10 a total of 2, other figures have appeared 1 times), and consider using the algorithm to achieve.
If the scope is 100, how to achieve?