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

分析: ...

#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. hibernate 表配置文件如何设置表字段的默认值

    修改对应实体类的配置文件,比如说 public class User{ private int age; //setter //getter } 配置文件 <property name=&quo ...

  2. paper 65 :尺度不变特征变换匹配算法[转载]

    尺度不变特征变换匹配算法 对于初学者,从David G.Lowe的论文到实现,有许多鸿沟,本文帮你跨越.1.SIFT综述 尺度不变特征转换(Scale-invariant feature transf ...

  3. 「ruby/MiniMagick」用MiniMagick处理图片

    包的选择和配置 想用RMagick,但据说内存泄露的问题比较厉害,作为替代品MiniMagick不存在内存泄露的问题.而二者都是使用ImageMagick的,所以需要下载并安装ImageMagick. ...

  4. 【RoR win32】提高rails new时bundle install运行速度

    在新建rails项目时,rails new老是卡在bundle install那里,少则五分钟,多则几十分.这是因为rails new时自动会运行bundle install,而bundle inst ...

  5. 【NOIP模拟赛】正方形大阵

    正方形大阵 [问题描述]   [输入格式]   第一行一个正整数n代表询问次数. 接下来n行每行一个不超过八位的小数k代表一组询问. [输出格式]   输出共n行,代表每次询问的答案:如果有无数个交点 ...

  6. 关于IE6/7的 inline-block

    今天在写代码的时候使用了inline-block,但是很意外的在IE6/7下此属性不给力~~ 但是由于我既需要他是个内联数据,又要设置它的宽度设置block,所以只能使用inline-block. 所 ...

  7. Date() 及其 如何验证用户输入的日期是合法的

    1.var someDate = new Date(Date.parse("May 25, 2004"));   <=>  var someDate = new Dat ...

  8. pycharm如何调试scrapy

    其实很简单,按下右上角的这个按钮 点击 跳出一个弹框 选择好 这三个基本就可以了 script是要运行的脚本即python中的Lib中的site-packages里面对应模块的执行文件(不懂的话,自行 ...

  9. selenium学习记录

    browser = webdriver.Firefox()browser是一个WebDriver类,常用的方法有 'add_cookie',添加cookie 'back',返回上一页 'close', ...

  10. resultMap / resultType

    ===================resultMap:实体类的属性和通过resultMap映射后的property属性一致 <resultMap id="workerSelect& ...