题目:统计区间中的平方数个数。

分析: ...

#include <stdio.h>
#include <string.h>
];
int main()
{
    int i, a, b, t;
    memset(on,,sizeof(on));
    ;i<=;i++)
        on[i*i] = ;
    while(~scanf("%d%d", &a, &b))
    {
    t=;
    &&b==)
    break;
    for(i=a;i<=b;i++)
        {
        if(on[i])
        t++;
        }
    printf("%d\n", t);
    }
    ;
}

UVA 11461 - Square Numbers的更多相关文章

  1. UVa 11461 - Square Numbers【数学,暴力】

    题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...

  2. UVA 11461 - Square Numbers 数学水题

    http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...

  3. UVA 11461 - Square Numbers(水题)

    题目链接 #include <cstdio> #include <cstring> #include <string> #include <cmath> ...

  4. UVa 10006 - Carmichael Numbers

    UVa 10006 - Carmichael Numbers An important topic nowadays in computer science is cryptography. Some ...

  5. Uva - 12050 Palindrome Numbers【数论】

    题目链接:uva 12050 - Palindrome Numbers 题意:求第n个回文串 思路:首先可以知道的是长度为k的回文串个数有9*10^(k-1),那么依次计算,得出n是长度为多少的串,然 ...

  6. UVA 11542 - Square(高斯消元)

    UVA 11542 - Square 题目链接 题意:给定一些数字.保证这些数字质因子不会超过500,求这些数字中选出几个,乘积为全然平方数,问有几种选法 思路:对每一个数字分解成质因子后.发现假设要 ...

  7. lintcode: Check Sum of Square Numbers

    Check Sum of Square Numbers Given a integer c, your task is to decide whether there're two integers ...

  8. UVA.136 Ugly Numbers (优先队列)

    UVA.136 Ugly Numbers (优先队列) 题意分析 如果一个数字是2,3,5的倍数,那么他就叫做丑数,规定1也是丑数,现在求解第1500个丑数是多少. 既然某数字2,3,5倍均是丑数,且 ...

  9. UVA - 13022 Sheldon Numbers(位运算)

    UVA - 13022 Sheldon Numbers 二进制形式满足ABA,ABAB数的个数(A为一定长度的1,B为一定长度的0). 其实就是寻找在二进制中满足所有的1串具有相同的长度,所有的0串也 ...

随机推荐

  1. paper 21 :Libsvm的安装和使用

    看了很多资料(包括我们实验室群里师兄上传的资料),算是掌握了libsvm的正确安装和使用,把结果告诉大家以方便以后使用. 1. 参考网站: libsvm库下载:http://www.csie.ntu. ...

  2. 夺命雷公狗---node.js---12之fs模块文件的操作

    node比客户端浏览器的js强的地方之一就是他的文件操作模块,可以直接对系统的文件进行操作 再打开来看下是否发生了变化,由此可见node的强大的地方了.. 实际代码如下所示: /** * Create ...

  3. php setcookie 讲解

    1.setcookie 中 $value 值不能为数组 e.g a.$arr = array('hh','bb');setcookie('username',$arr);这种不会生效的 如果确实要放数 ...

  4. SVN使用(二)

    TortoiseSVN是windows平台下Subversion的免费开源客户端. 一般我们都是先讲讲服务器的配置,然后再讲客户端的使用,但是在TortoiseSVN上,却可以反过来.因为,如果你的要 ...

  5. grid

  6. C++中的类型重定义

    发现重复定义是由于从两个不同的路径包含了同一个头文件而引起的,同事也建议从另外一个路径打开工程试试, 这才慢慢发现了原因.这个原因可能有些拗口,而事实上要出现这种错误也有些"曲折" ...

  7. c# TCPclient

    服务端 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; ...

  8. Winform知识点

    Winform窗体常用的控件 1.按钮 Button 前缀:btn 2.文本框 TextBox 前缀:txt 3.单选按钮 RadioButton 前缀:rdo 4.复选按钮 CheckBox 前缀: ...

  9. android的基础入门

        一.   A通信技术   1. 1G  仅限语音的蜂窝式通话标准 2. 2G  (时分多路复用)数字语音传输技术和增加接收数据的功能 3. 3G  传输声音和数据的速度有很大的 提升 4. 4 ...

  10. 20150625_Andriod_02_ListView2_多条目显示_选中

    android listview 参考地址: http://www.cnblogs.com/zhengbeibei/archive/2013/05/14/3078805.html  http://xy ...