Description

Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it?

Input

The input contains a single integer n (0 ≤ n ≤ 2000000000).

Output

Output a single integer.

Examples
input
11
output
2
input
14
output
0
input
61441
output
2
input
571576
output
10
input
2128506
output
3
化成16进制,然后数圈圈
#include<bits/stdc++.h>
using namespace std;
#define ll long long
string s;
int a,b,c,d;
int main()
{
int ans;
cin>>ans;
if(ans==)
{
a++;
}
while(ans)
{
if(ans%==)
{
a++;
}
else if(ans%==)
{
a+=;
}
else if(ans%==)
{
a++;
}
else if(ans%==)
{
a++;
}
else if(ans%==)
{
a+=;
}
else if(ans%==)
{
a++;
}
else if(ans%==)
{
a++;
}
else if(ans%==)
{
a++;
}
ans/=;
}
cout<<a<<endl;
return ;
}

最新文章

  1. 那些年,坑死自己的事之fread/fwrite
  2. cefsharp设置网页接受语言Accept-Language
  3. 改变了一下blog的主题,很开心
  4. 【ToolGood.Words】之【StringSearch】字符串搜索——基于BFS算法
  5. pushState onpopstate
  6. 【转】 .NET中STAThread和MTAThread
  7. 怎么修改placeholder字体的css样式
  8. linux中怎样设置DHCP
  9. linux DHCP安装和测试
  10. Linux 下安装idea,提示svn版本太低问题
  11. the security settings could not be applied to the database(mysql安装error)【简记】
  12. leetcode刷题——一些算法技巧总结2.0
  13. python命令行运行py文件找不到模块的解决办法
  14. MySql 中文写入数据库乱码及Incorrect string value: &#39;\xF0\x9F...&#39; for column &#39;XXX&#39; at row 1解决
  15. Spark学习笔记——键值对操作
  16. LeetCode 965 Univalued Binary Tree 解题报告
  17. 关于VS2017的安装和WDK的选择问题
  18. LeetCode--108--将有序数组转化为二叉搜索树
  19. bzoj 1899 贪心+dp
  20. Openresty增加waf配置

热门文章

  1. appium部分api
  2. 不能实现RadioButton默认选择
  3. Pattern: Microservice Architecture
  4. jQuery 怎么获取对象
  5. webpack 构建多页面应用
  6. android user 版本如何默认adb调试为打开【转】
  7. 一步一步学Silverlight 2系列(10):使用用户控件
  8. Tomcat 系统架构与设计模式之一
  9. ubuntu下tesseract 4.0安装及参数使用
  10. 【POJ 1655】 Balancing Act