Bitset hd 2051
来源:互联网 发布:淘宝卖燕窝怎么程序 编辑:程序博客网 时间:2024/05/17 04:15
Problem Description
Give you a number on base ten,you should output it on base two.(0 < n < 1000)
Input
For each case there is a postive number n on base ten, end of file.
Output
For each case output a number on base two.
Sample Input
1
2
3
Sample Output
1
10
Give you a number on base ten,you should output it on base two.(0 < n < 1000)
Input
For each case there is a postive number n on base ten, end of file.
Output
For each case output a number on base two.
Sample Input
1
2
3
Sample Output
1
10
11
#include<stdio.h>int main(){ int i,n,m,j,a[100]; while(scanf("%d",&n)!=EOF) { i=0; while(n) { i=i+1; a[i]=n%2; n/=2; } for(i;i>0;i--) printf("%d",a[i]); printf("\n"); } return 0;}
0 0
- hd 2051 Bitset
- Bitset hd 2051
- 杭电Hd 2051 Bitset
- 1408140917-hd-Bitset.cpp
- 2051 Bitset
- 【Bitset 2051】
- Bitset 2051
- 2051 Bitset
- 2051 Bitset
- [2051]:Bitset
- 2051Bitset
- HDOJ 2051 Bitset
- 杭电 2051 Bitset
- Hdu 2051 - Bitset
- HDU 2051 Bitset
- HDU 2051 - Bitset
- 杭电 2051 Bitset
- 2051——Bitset
- Java进阶(三十七)java 自动装箱与拆箱
- MFC之菜单资源详解
- 玩转Easy UI框架的artDialog(四)常用实例
- 1008. 数组元素循环右移问题 (20)
- CC150
- Bitset hd 2051
- 移动端爬坑记 --- (2)移动端访问设备判断(user-agent)及实现流程
- poj2105
- LintCode(easy)旋转字符串(!!!我有史以来解决的问题最快的一次,心酸流泪)
- Activity中使用注解进行状态保存
- Windows下的PHP开发环境配置及常见问题解决
- POJ3311(TSP问题,状态压缩DP)
- 2016夏季练习——最小生成树
- ThinkPHP 3.2.3 入口文件设置总结