April Fools Contest 2017 B
Description
Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it?
The input contains a single integer n (0 ≤ n ≤ 2000000000).
Output a single integer.
11
2
14
0
61441
2
571576
10
2128506
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 ;
}
April Fools Contest 2017 B的更多相关文章
- April Fools Contest 2017 题解&源码(A,数学 B,数学 C,数学 D,字符串 E,数字逻辑 F,排序,卡时间,G,数学)
A. Numbers Joke time limit per test:2 seconds memory limit per test:64 megabytes input:standard inpu ...
- Codeforces April Fools Contest 2017
都是神题,我一题都不会,全程听学长题解打代码,我代码巨丑就不贴了 题解见巨神博客 假装自己没有做过这套
- April Fools Contest 2017 题解
趁着上课无聊,来补一补-- A. Numbers Joke 直接oeis就好了:http://oeis.org/search?q=numbers+joke&language=english&a ...
- April Fools Contest 2017 F
Description You are developing a new feature for the website which sells airline tickets: being able ...
- April Fools Contest 2017 E
Description Input The input consists of four lines, each line containing a single digit 0 or 1. Outp ...
- April Fools Contest 2017 D
Description Input The only line of the input contains a string of digits. The length of the string i ...
- April Fools Contest 2017 C
Description DO YOU EXPECT ME TO FIND THIS OUT? WHAT BASE AND/XOR LANGUAGE INCLUDES string? DON'T BYT ...
- April Fools Contest 2017 A
Description Input The input contains a single integer a (1 ≤ a ≤ 30). Output Output a single integer ...
- April Fools Contest 2018
这个比赛不正经,但是我可以一本正经的写代码啊 A. Quirky Quantifiers time limit per test 2 seconds memory limit per test 64 ...
随机推荐
- ITOO高校云平台之考评系统项目总结
高校云平台,将云的概念引入到我的生活, 高校云平台主要是以各大高校的业务为基础设计开发,包含权限系统,基础系统.新生入学系统.考评系统,成绩系统.选课系统,视频课系统.3月份參加云平台3.0的开发,至 ...
- BZOJ3260: 跳
BZOJ3260: 跳 Description 邪教喜欢在各种各样空间内跳.现在,邪教来到了一个二维平面. 在这个平面内,如果邪教当前跳到了(x,y),那么他下一步可以选择跳到以下4个点: (x-1, ...
- iOS中区分照片的来源
原理就是通过枚举出每个assets group,然后取得group property,group property是个整数,对应头文件中的一些枚举值.用这个可以判断照片是从哪来的(相机胶卷.照片流.相 ...
- Java类加载器(ClassLoader)
类加载的机制的层次结构 每个编写的”.java”拓展名类文件都存储着需要执行的程序逻辑,这些”.java”文件经过Java编译器编译成拓展名为”.class”的文件,”.class”文件中保存着Jav ...
- Java中需要了解的点
1.32位jvm.64位区别? 2.
- YTU 2577: 小数计算——结构体
2577: 小数计算--结构体 时间限制: 1 Sec 内存限制: 128 MB 提交: 978 解决: 647 题目描述 小数可以看成是一个点和两个数组成的,因此可以定义成一个小数的结构体,现在 ...
- 计算机学院大学生程序设计竞赛(2015’12)01 Matrix
01 Matrix Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total ...
- vue中手机号,邮箱正则验证以及60s发送验证码
今天写了一个简单的验证,本来前面用的组件,但是感觉写的组件在此项目不是很好用,由于用到的地方比较少,所以直接写在了页面中.页面展示如图 <div> <p class=&quo ...
- idea 设置背景图片
按下 Ctrl+Shift+A 你会看到一个对话框 在里面输入 Set Background Image 进入设置背景图片窗口 设置背景图,点击确定即可 就一个好看,强大的编程工具了
- 目前最新版本ActiveMQ 5.15.3 和JDK版本有关的问题
java.lang.UnsupportedClassVersionError: org/apache/activemq/ActiveMQConnectionFactory : Unsupported ...