水题,输出的时候注意下

#include <stdio.h>
#include <math.h> int main()
{
int d;
scanf("%d",&d);
while(d--)
{
int binary[];
int n,i=;
scanf("%d",&n); while(n!=)
{
binary[i++]=n%;
n/=;
} int flag=;
for(int j=;j<i;j++)
{
if(binary[j])
{
printf("%d",j);
if(j!=i-)
printf(" ");
}
}
printf("\n");
} return ;
}

ZOJ Problem Set - 1383 Binary Numbers的更多相关文章

  1. zoj 1383 Binary Numbers

    Binary Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB Given a positive integer n, print o ...

  2. ZOJ Problem Set - 1078 Palindrom Numbers

    属于水题,主要是涉及到回文问题. 这里标注下进制转换的方法: while(n) { p[i]=n%basis; n/=basis; } 见代码: #include <stdio.h> in ...

  3. HDU-1390 Binary Numbers

    http://acm.hdu.edu.cn/showproblem.php?pid=1390 Binary Numbers Time Limit: 2000/1000 MS (Java/Others) ...

  4. Binary Numbers(HDU1390)

    Binary Numbers 点我 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  5. Codeforces Round #515 (Div. 3) E. Binary Numbers AND Sum

    E. Binary Numbers AND Sum 题目链接:https://codeforces.com/contest/1066/problem/E 题意: 给出两个用二进制表示的数,然后将第二个 ...

  6. 【Leetcode_easy】1022. Sum of Root To Leaf Binary Numbers

    problem 1022. Sum of Root To Leaf Binary Numbers 参考 1. Leetcode_easy_1022. Sum of Root To Leaf Binar ...

  7. ZOJ Problem Set - 1090——The Circumference of the Circle

      ZOJ Problem Set - 1090 The Circumference of the Circle Time Limit: 2 Seconds      Memory Limit: 65 ...

  8. ZOJ Problem Set - 1394 Polar Explorer

    这道题目还是简单的,但是自己WA了好几次,总结下: 1.对输入的总结,加上上次ZOJ Problem Set - 1334 Basically Speaking ac代码及总结这道题目的总结 题目要求 ...

  9. ZOJ Problem Set - 1025解题报告

    ZOJ Problem Set - 1025 题目分类:基础题 原题地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=10 ...

随机推荐

  1. redis配置文件英译汉

    # By default Redis asynchronously dumps the dataset on disk. This mode is # good enough in many appl ...

  2. 数据库表A中随机X条数据满足N条件的数据插入到表B中

    select  * into c FROM a TABLESAMPLE (5 PERCENT) select top 5 per * into c from a order by newid() se ...

  3. error C2678

    自定义结构类型,为支持插入到stl set或者排序,一种方式是重载operator<运算符成员函数.如果忘记将函数标识为const,则在编译时会报 6>c:\program files ( ...

  4. HTML Help WorkShop 创作、调用方法和技巧

    一.在CHM 文件中所用到的弹出式菜单: 二.在HTML Help WorkShop 中不用显示的样式   (1).从右到右阅读顺序. (2).对话框 (3).滚动条在左边 (4).仅展开单个标题   ...

  5. RemoteIE 开发者可跨平台使用IE测试网页

    RemoteIE,这是一个基于微软Azure的服务,它允许开发者在最新版本的IE(Windows 10技术预览版)中测试他们的网页,而不需要安装或在虚拟机中设置对应的系统.要想使用这项服务,开发者需要 ...

  6. Android动画小记录

    今天在做一个头部滑动菜单的时候需要使用TranslateAnimation(float fromXDelta, float toXDelta, float fromYDelta, float toYD ...

  7. 如何创建一个RESTful WCF Service

    原创地址:http://www.cnblogs.com/jfzhu/p/4044813.html 转载请注明出处 (一)web.config文件 要创建REST WCF Service,endpoin ...

  8. MVVM架构~目录

    回到占占推荐博客索引 MVVM在概念上是真正将页面与数据逻辑分离的模式,在开发方式上,它是真正将前台代码开发者(JS+HTML)与后台代码开发者分离的模式(asp,asp.net,php,jsp).在 ...

  9. Atitti 存储引擎支持的国内点与特性attilax总结

    Atitti 存储引擎支持的国内点与特性attilax总结 存储引擎处理的事情: · 并发性:某些应用程序比其他应用程序具有很多的颗粒级锁定要求(如行级锁定). · 事务支持:并非所有的应用程序都需要 ...

  10. JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式

    相关链接: JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式 JS面向对象(2) -- this的使用,对 ...