uva 11461 - Square Numbers(数论)
来源:互联网 发布:游戏王怪兽之决斗 知乎 编辑:程序博客网 时间:2024/06/09 23:04
题目链接:uva 11461 - Square Numbers
题目大意:给出a,b,求a~b间平方数的个数。
解题思路:sqrt(b) - sqrt(a-1),注意一下精度误差。
#include <stdio.h>#include <string.h>#include <math.h>int main () {int a, b;while (scanf("%d%d", &a, &b) == 2 && a + b) {int t = floor(sqrt(b)) - floor(sqrt(a-1));printf("%d\n", t);}return 0;}
0 0
- uva 11461 - Square Numbers(数论)
- UVA 11461 - Square Numbers(数论)
- UVa 11461 - Square Numbers
- uva 11461 Square Numbers
- UVA - 11461 Square Numbers
- UVa 11461 - Square Numbers
- UVA 11461-Square Numbers
- uva 11461Square Numbers
- UVa OJ 11461-Square Numbers
- UVA 11461 K - Square Numbers
- UVa 11461 Square Numbers (简单数学)
- UVA 11461 - Square Numbers 数学水题
- UVa 11461 - Square Numbers (水题)
- [UVA](11461)Square Numbers ---完全平方数
- vjudge 5110.Square-Free Numbers | 简单数论
- Uva 11461 - Square Numbers 解题报告(水题)
- UVA 10042 Smith Numbers 数论
- UVa 136 Ugly Numbers (数论)
- 今天开始写博客!
- 网站统计中的数据收集原理及实现
- 我们需要什么样的敏捷开发?
- 开源项目学习方法
- SEC_PROTOCOL_ERROR_FURTHER_ACTION
- uva 11461 - Square Numbers(数论)
- 字符串总结
- 右滑动返回
- tkowalczyk/KinectTiltCamera
- 由js中一句return false引发出来的许多事
- java常用内存区域与代码块
- windows下捕获dump
- 第五部分 作用域、静态变量、友元、多文件操作
- HTML5基础,第4部分:点睛之笔Canvas (2)