HUD 2051 Bitset
来源:互联网 发布:新理念网络测试答案 编辑:程序博客网 时间:2024/05/29 18:10
Bitset
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16057 Accepted Submission(s): 12199
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
123
Sample Output
11011题意:十进制转二进制#include <stdio.h>int main(){int n;int a[15],i;while(~scanf("%d",&n)){for(i=0;n;i++){a[i]=n%2;n/=2;}for(i=i-1;i>=0;i--)printf("%d",a[i]);putchar('\n');}return 0;}
0 0
- HUD 2051 Bitset (水)
- HUD 2051 Bitset
- 2051 Bitset
- 【Bitset 2051】
- Bitset 2051
- 2051 Bitset
- 2051 Bitset
- [2051]:Bitset
- 2051Bitset
- HUD
- HDOJ 2051 Bitset
- 杭电 2051 Bitset
- Hdu 2051 - Bitset
- HDU 2051 Bitset
- HDU 2051 - Bitset
- 杭电 2051 Bitset
- 2051——Bitset
- 杭电2051 Bitset
- 黑马程序员_java环境配置
- 黑马程序员——File类
- 黑马程序员——java基础——面向对象
- stm32上DMA的学习笔记
- 一阶逻辑 备忘
- HUD 2051 Bitset
- Longest Common Substring最长公共子字符串
- Android实战简易教程-第五十八枪(AlarmManager类用法研究小实例)
- Shader 学习历程(一)——第一个shader
- 使用RecyclerView实现带Header和Footer的GridView
- leetcode刷题,总结,记录,备忘 77
- ios下使用AFNetworking通过Nginx服务器实现大文件上传
- ZOJ - 3822 Domination (概率DP)
- Linux战地日记——权限管理命令