Codeforces Round #219 (Div. 2) B. Making Sequences is Fun
We'll define S ( n ) for positive integer n as follows: the number of the n 's digits in the decimal base. For example, S (893)?=?3 , S (114514)?=?6 . You want to make a consecutive integer sequence starting from number m ( m ,? m ??1,?...
We'll define S(n) for positive integer n as follows: the number of the n's digits in the decimal base. For example,S(893)?=?3, S(114514)?=?6.
You want to make a consecutive integer sequence starting from number m (m,?m?+?1,?...). But you need to payS(n)·k to add the number n to the sequence.
You can spend a cost up to w, and you want to make the sequence as long as possible. Write a program that tells sequence's maximum length.
上一篇: 十天学会php之第十天_php基础
下一篇: 怎么样能够从零开始学习微信的开发模式?
推荐阅读
-
Codeforces Round #649 (Div. 2)-B. Most socially-distanced subsequence(思维)
-
Codeforces Round #461 (Div. 2) B. Magic Forest(异或的性质)
-
Codeforces Round #663 (Div. 2) B. Fix You
-
Codeforces Round #658 (Div. 2) B. Sequential Nim
-
B. Power Sequence(数学+枚举)Codeforces Round #666 (Div. 2)
-
Codeforces Round #666 (Div. 2)B. Power Sequence(等比数列)
-
Codeforces Round #664 (Div. 2) B. Boboniu Plays Chess
-
Codeforces Round #272 (Div. 2) B. Dreamoon and WiFi (超几何
-
Codeforces Round #258 (Div. 2) B. Sort the Array (模拟)
-
Codeforces Round #657 (Div. 2) B. Dubious Cyrpto(思维,数学)