简单 打个表 case数不超过200 数据比较水  木有超时的风险~~

  1. /*************************************************************************
  2. > Author: xlc2845 > Mail: xlc2845@gmail.com
  3. > Created Time: 2013年10月24日 星期四 16时01分10秒
  4. ************************************************************************/
  5.  
  6. #include <iostream>
  7. #include <cstdio>
  8. #include <cstdlib>
  9. #include <cmath>
  10. #include <vector>
  11. #include <cstring>
  12. #include <algorithm>
  13. #define maxn 210
  14.  
  15. using namespace std;
  16. bool ok[100010];
  17. void init()
  18. {
  19. memset(ok, false, sizeof(ok));
  20. for(int i = 1; i*i <= 100000; i++)
  21. ok[i*i] = true;
  22. }
  23. int main()
  24. {
  25. init();
  26. int x,y,ans;
  27. while(scanf("%d%d",&x,&y) == 2 && x+y)
  28. {
  29. ans = 0;
  30. for(int i = x; i <= y; i++)
  31. if(ok[i]) ++ans;
  32. printf("%d\n",ans);
  33. }
  34. return 0;
  35. }

uva 11461的更多相关文章

  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 11461 - Square Numbers

    题目:统计区间中的平方数个数. 分析: ... #include <stdio.h> #include <string.h> ]; int main() { int i, a, ...

  5. Square Numbers UVA - 11461(水题)

    #include <iostream> #include <cstdio> #include <sstream> #include <cstring> ...

  6. uva 1354 Mobile Computing ——yhx

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABGcAAANuCAYAAAC7f2QuAAAgAElEQVR4nOy9XUhjWbo3vu72RRgkF5

  7. UVA 10564 Paths through the Hourglass[DP 打印]

    UVA - 10564 Paths through the Hourglass 题意: 要求从第一层走到最下面一层,只能往左下或右下走 问有多少条路径之和刚好等于S? 如果有的话,输出字典序最小的路径 ...

  8. UVA 11404 Palindromic Subsequence[DP LCS 打印]

    UVA - 11404 Palindromic Subsequence 题意:一个字符串,删去0个或多个字符,输出字典序最小且最长的回文字符串 不要求路径区间DP都可以做 然而要字典序最小 倒过来求L ...

  9. UVA&&POJ离散概率与数学期望入门练习[4]

    POJ3869 Headshot 题意:给出左轮手枪的子弹序列,打了一枪没子弹,要使下一枪也没子弹概率最大应该rotate还是shoot 条件概率,|00|/(|00|+|01|)和|0|/n谁大的问 ...

随机推荐

  1. 第一次使用github很高端的赶脚

  2. iOS - 基于蓝牙数据交换的环境监测(温度、湿度、光照、粉尘、噪声)

    一.蓝牙外设的数据接收 二.App端显示获取数据            

  3. Quartz.NET快速上手第一课(官网文档翻译)

    Quartz.NET快速上手第一课(官网文档翻译) 原文链接 在你使用调度者(scheduler)之前,你需要对它进行实例化(谁能猜到这呢?).在实例化scheduler时候,你需要使用ISchedu ...

  4. zz Release memory in Linux (Unused or Cached)

    In computer science, Memory Leakage occurs when a computer software or program consumes required mem ...

  5. Poj 2503 / OpenJudge 2503 Babelfish

    1.Link: http://poj.org/problem?id=2503 http://bailian.openjudge.cn/practice/2503/ 2.Content: Babelfi ...

  6. 使用JavaScript实现简单的输入校验

    HTML页面代码: <!doctype html> <html lang="en"> <head> <meta charset=" ...

  7. 微软有完善的WP开发教程

    微软的Windows Phone 开发者中心 地址:http://dev.windowsphone.com/zh-cn/develop由于这里的教程非常完善,大家直要把开发者中心的内容看完就可以了,所 ...

  8. PHP文件操作

    1.递归获取目录下文件的个数 function getFileCount($dir){ if(!is_dir($dir)) return false; //打开目录 $handle = opendir ...

  9. winForm 打印预览

    自己很少写技术博客,虽然已经干程序员两年多了,winform开发,web开发都干过,不论项目大小对于.net的相关技术也是了解的,如mvc,wcf,wpf,silverlight,socekt通讯,n ...

  10. 一款兼容pc 移动端的tab切换

    利用touchslider.js插件来制作的tab切换,可任意修改很方便~~~ 样式: <style> .box-163css{ width:100%; position:relative ...