码迷,mamicode.com
首页 > 其他好文 > 详细

SRM631 Div2 1000 ???

时间:2014-09-07 01:00:14      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   io   ar   art   div   

保存代码,题解待更新。。。

 

bubuko.com,布布扣
 1 #include <cstdio>
 2 #include <string>
 3 #include <vector>
 4 #include <map>
 5 using namespace std;
 6 
 7 #define LL long long
 8 
 9 class TaroCoins{
10 public:
11     long long getNumber(long long N){
12         LL pushOne = 0, notPush = 1;
13         while(N){
14             int dgt = N & 1; N >>= 1;
15             if(!dgt)
16                 pushOne += notPush;
17             else
18                 notPush += pushOne;
19         }
20         return notPush;
21     }
22 };
View Code

 

SRM631 Div2 1000 ???

标签:style   blog   http   color   os   io   ar   art   div   

原文地址:http://www.cnblogs.com/Ntcrush/p/3959997.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!