uva 11461
简单 打个表 case数不超过200 数据比较水 木有超时的风险~~
- /*************************************************************************
- > Author: xlc2845 > Mail: xlc2845@gmail.com
- > Created Time: 2013年10月24日 星期四 16时01分10秒
- ************************************************************************/
- #include <iostream>
- #include <cstdio>
- #include <cstdlib>
- #include <cmath>
- #include <vector>
- #include <cstring>
- #include <algorithm>
- #define maxn 210
- using namespace std;
- bool ok[100010];
- void init()
- {
- memset(ok, false, sizeof(ok));
- for(int i = 1; i*i <= 100000; i++)
- ok[i*i] = true;
- }
- int main()
- {
- init();
- int x,y,ans;
- while(scanf("%d%d",&x,&y) == 2 && x+y)
- {
- ans = 0;
- for(int i = x; i <= y; i++)
- if(ok[i]) ++ans;
- printf("%d\n",ans);
- }
- return 0;
- }
uva 11461的更多相关文章
- UVa 11461 - Square Numbers【数学,暴力】
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...
- UVA 11461 - Square Numbers 数学水题
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...
- UVA 11461 - Square Numbers(水题)
题目链接 #include <cstdio> #include <cstring> #include <string> #include <cmath> ...
- UVA 11461 - Square Numbers
题目:统计区间中的平方数个数. 分析: ... #include <stdio.h> #include <string.h> ]; int main() { int i, a, ...
- Square Numbers UVA - 11461(水题)
#include <iostream> #include <cstdio> #include <sstream> #include <cstring> ...
- uva 1354 Mobile Computing ——yhx
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABGcAAANuCAYAAAC7f2QuAAAgAElEQVR4nOy9XUhjWbo3vu72RRgkF5
- UVA 10564 Paths through the Hourglass[DP 打印]
UVA - 10564 Paths through the Hourglass 题意: 要求从第一层走到最下面一层,只能往左下或右下走 问有多少条路径之和刚好等于S? 如果有的话,输出字典序最小的路径 ...
- UVA 11404 Palindromic Subsequence[DP LCS 打印]
UVA - 11404 Palindromic Subsequence 题意:一个字符串,删去0个或多个字符,输出字典序最小且最长的回文字符串 不要求路径区间DP都可以做 然而要字典序最小 倒过来求L ...
- UVA&&POJ离散概率与数学期望入门练习[4]
POJ3869 Headshot 题意:给出左轮手枪的子弹序列,打了一枪没子弹,要使下一枪也没子弹概率最大应该rotate还是shoot 条件概率,|00|/(|00|+|01|)和|0|/n谁大的问 ...
随机推荐
- 第一次使用github很高端的赶脚
- iOS - 基于蓝牙数据交换的环境监测(温度、湿度、光照、粉尘、噪声)
一.蓝牙外设的数据接收 二.App端显示获取数据
- Quartz.NET快速上手第一课(官网文档翻译)
Quartz.NET快速上手第一课(官网文档翻译) 原文链接 在你使用调度者(scheduler)之前,你需要对它进行实例化(谁能猜到这呢?).在实例化scheduler时候,你需要使用ISchedu ...
- zz Release memory in Linux (Unused or Cached)
In computer science, Memory Leakage occurs when a computer software or program consumes required mem ...
- Poj 2503 / OpenJudge 2503 Babelfish
1.Link: http://poj.org/problem?id=2503 http://bailian.openjudge.cn/practice/2503/ 2.Content: Babelfi ...
- 使用JavaScript实现简单的输入校验
HTML页面代码: <!doctype html> <html lang="en"> <head> <meta charset=" ...
- 微软有完善的WP开发教程
微软的Windows Phone 开发者中心 地址:http://dev.windowsphone.com/zh-cn/develop由于这里的教程非常完善,大家直要把开发者中心的内容看完就可以了,所 ...
- PHP文件操作
1.递归获取目录下文件的个数 function getFileCount($dir){ if(!is_dir($dir)) return false; //打开目录 $handle = opendir ...
- winForm 打印预览
自己很少写技术博客,虽然已经干程序员两年多了,winform开发,web开发都干过,不论项目大小对于.net的相关技术也是了解的,如mvc,wcf,wpf,silverlight,socekt通讯,n ...
- 一款兼容pc 移动端的tab切换
利用touchslider.js插件来制作的tab切换,可任意修改很方便~~~ 样式: <style> .box-163css{ width:100%; position:relative ...