数学 SCU 4436 Easy Math
/*
数学题:当有一个数开根号后是无理数,则No
*/
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <iostream>
#include <string>
#include <map>
#include <set>
using namespace std; typedef long long ll;
const int MAXN = 1e5 + ;
const int INF = 0x3f3f3f3f; bool ok(int x)
{
int y = sqrt (x);
if (y * y == x) return true;
else return false;
} int main(void) //SCU 4436 Easy Math
{
// freopen ("A.in", "r", stdin); int n;
while (scanf ("%d", &n) == )
{
bool flag = true;
for (int i=; i<=n; ++i)
{
int x; scanf ("%d", &x);
if (!ok (x)) flag = false;
} if (flag) puts ("Yes");
else puts ("No");
} return ;
}
数学 SCU 4436 Easy Math的更多相关文章
- scu 4436: Easy Math 水题
4436: Easy Math Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.scu.edu.cn/soj/problem.actio ...
- SCU 4436 Easy Math 2015年四川省赛题
题目链接:http://acm.scu.edu.cn/soj/problem/4436/ 题意:给你n个整数,求这n个数的平方根和是否是一个整数: 解题思路:如果这题每个数给他算出来,必然费时间,可能 ...
- 2015弱校联盟(1) -A. Easy Math
A. Easy Math Time Limit: 2000ms Memory Limit: 65536KB Given n integers a1,a2,-,an, check if the sum ...
- [ACM-ICPC 2018 徐州赛区网络预赛][D. Easy Math]
题目链接:Easy Math 题目大意:给定\(n(1\leqslant n\leqslant 10^{12}),m(1\leqslant m\leqslant 2*10^{9})\),求\(\sum ...
- 徐州赛区网络预赛 D Easy Math
比赛快结束的适合看了一下D题,发现跟前几天刚刚做过的HDU 5728 PowMod几乎一模一样,当时特兴奋,结果一直到比赛结束都一直WA.回来仔细一琢磨才发现,PowMod这道题保证了n不含平方因子, ...
- 数字(数学)操作类 Math Random 类 ,大数字操作类
Math 提供了大量的数学操作方法 Math类中所有的方法都是static 方法
- 怎么学数学[How to Study Math]
- 【ACM-ICPC 2018 徐州赛区网络预赛】D.Easy Math 杜教筛
代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 20000000; ...
- @hdu - 6607@ Easy Math Problem
目录 @description@ @solution@ @accepted code@ @details@ @description@ 求: \[\sum_{i=1}^{n}\sum_{j=1}^{n ...
随机推荐
- 【转】Linux下添加新硬盘,分区及挂载
原文:http://blog.chinaunix.net/uid-25829053-id-3067619.html ------------------------------------------ ...
- UI 07 _ 导航视图控制器 与 属性传值
首先, 先创建三个VC. 完毕点击按钮, 进入下一页, 并可以返回. 要先把导航视图控制器创建出来. 在AppDelegate.m 文件里代码例如以下: #import "AppDelega ...
- #include<> 和 #include""的区别
#include< file >编译程序会先到标准函数库中找文件 #include”file” 编译程序会先从当前目录中找文件 参考原文 转: 在C程序中包含文件有以下两种方法: (1)用 ...
- iOS 沙盒文件操作
//获得document +(NSString *)documentsPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDoc ...
- Building Microservices: Using an API Gateway
What are microservices? http://microservices.io/ What are microservices? Microservices - also known ...
- springmvc的异常统一处理
在项目实际开发中,异常的统一处理是一个常态.假如不使用异常统一处理,我们往往需要在service层中捕获异常,并且根据不同的异常在result中的设置不同的code并给予相应的提示.这样可能会导致不同 ...
- atom及其插件activate-power-mode下载安装
Atom是Github推出的一个文本编辑器,其中包含很多插件可以自行下载安装,其中一个最近比较火的就是插件activate-power-mode,可以实现打字屏振效果, 打字带特效哦,所以最近就尝试安 ...
- log4j_自定义样式参数意义
#自定义样式 %c 输出所属的类目,通常就是所在类的全名 %C 输出Logger所在类的名称,通常就是所在类的全名 %d 输出日志时间点的日期或时间,默认格式为ISO8601,也可以在其后指定格式,比 ...
- ubuntu截图工具及GNOME的使用及类似qq截图快捷键
1:了解gnome参数 gnome-screenshot -h
- winform 无法修改控件的location
dock and location 是因为设置了控件的Dock,导致无法修改