1205 - AB类数计数

通过次数

0

提交次数

1

时间限制 : 1 秒
内存限制 : 128 MB

 

<span style="font-family:宋体;">若将一个正整数化为二进制数,在此二进制数中,我们将数字</span><span>1</span><span style="font-family:宋体;">的个数多于数字</span><span>0</span><span style="font-family:宋体;">的个数的这类二进制数称为</span><span>A</span><span style="font-family:宋体;">类数,否则就称其为</span><span>B</span><span style="font-family:宋体;">类数。</span> 

<span><span>&nbsp;&nbsp;&nbsp; </span></span><span style="font-family:宋体;">例如:(</span><span>13</span><span style="font-family:宋体;">)</span><sub><span>10</span></sub><span>=</span><span style="font-family:宋体;">(</span><span>1101</span><span style="font-family:宋体;">)</span><sub><span>2</span></sub> 

<span><span>&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family:宋体;">其中</span><span>1</span><span style="font-family:宋体;">的个数为</span><span>3</span><span style="font-family:宋体;">,</span><span>0</span><span style="font-family:宋体;">的个数为</span><span>1</span><span style="font-family:宋体;">,则称此数为</span><span>A</span><span style="font-family:宋体;">类数;</span> 

<span><span>&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span>&nbsp;</span></span><span style="font-family:宋体;">(</span><span>10</span><span style="font-family:宋体;">)</span><sub><span>10</span></sub><span>=</span><span style="font-family:宋体;">(</span><span>1010</span><span style="font-family:宋体;">)</span><sub><span>2</span></sub> 

<span><span>&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family:宋体;">其中</span><span>1</span><span style="font-family:宋体;">的个数为</span><span>2</span><span style="font-family:宋体;">,</span><span>0</span><span style="font-family:宋体;">的个数也为</span><span>2</span><span style="font-family:宋体;">,称此数为</span><span>B</span><span style="font-family:宋体;">类数;</span> 

<span><span>&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family:宋体;">(</span><span>24</span><span style="font-family:宋体;">)</span><sub><span>10</span></sub><span>=</span><span style="font-family:宋体;">(</span><span>11000</span><span style="font-family:宋体;">)</span><sub><span>2</span></sub> 

<span><span>&nbsp;&nbsp;&nbsp; </span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family:宋体;">其中</span><span>1</span><span style="font-family:宋体;">的个数为</span><span>2</span><span style="font-family:宋体;">,</span><span>0</span><span style="font-family:宋体;">的个数为</span><span>3</span><span style="font-family:宋体;">,则称此数为</span><span>B</span><span style="font-family:宋体;">类数;</span> 

<span><span>&nbsp;&nbsp; </span></span><span style="font-family:宋体;">程序要求:求出</span><span>1</span><span style="font-family:宋体;">~</span><span>1000</span><span style="font-family:宋体;">之中(包括</span><span>1</span><span style="font-family:宋体;">与</span><span>1000</span><span style="font-family:宋体;">),全部</span><span>A</span><span style="font-family:宋体;">、</span><span>B</span><span style="font-family:宋体;">两类数的个数。</span> 

输入

输出

在同一行输出,空格分隔A、B两类数的个数。

样例

输入


                            

输出


                            

来源

入门题-模拟