#BZOJ2425. 计数

计数

No submission language available for this problem.

题目描述

<b style="mso-bidi-font-weight:

normal">你有一组非零数字(不一定唯一),你可以在其中插入任意个0,这样就可以产生无限个数。比如说给定{1,2},那么可以生成数字12,21,102,120,201,210,1002,1020,等等。<o:p></o:p></b>

<b style="mso-bidi-font-weight:

normal">现在给定一个数,问在这个数之前有多少个数。(注意这个数不会有前导0).<o:p></o:p></b>

 

输入格式

<span style="font-family:宋体;mso-ascii-font-family:

"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-fareast-language:

ZH-CN">只有</span>

1<span style="font-family:宋体;mso-ascii-font-family:

"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-fareast-language:

ZH-CN">行,为</span></b>1<span style="font-family:宋体;mso-ascii-font-family:

"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-fareast-language:

ZH-CN">个整数</span>n.<o:p></o:p></b>

</p>

 

输出格式

"Times New Roman";mso-fareast-language:ZH-CN">只有

整数<span style="font-family:宋体;mso-ascii-font-family:

"Times New Roman";mso-hansi-font-family:"Times New Roman";mso-fareast-language:

ZH-CN">,</span>表示</b>N之前出现的数的个数。<o:p></o:p>

</p>

1020
7

数据范围与约定

n的长度不超过50,答案不超过263-1.