数学 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 ...
随机推荐
- 解决安装oracle11g r2时提示pdksh conflicts with ksh-20100621-2.el6.i686问题
http://blog.csdn.net/linghao00/article/details/7943740 http://www.2cto.com/os/201306/218566.html 在Ce ...
- [javase学习笔记]-9.2 单继承与多重继承
这一节我们来看java中的单继承和多重继承. 在java语言中,支持的是单继承,不直接支持多继承,可是对C++中的多继承进行了改良. 那么什么是单继承和多继承呢? 单继承:一个子类仅仅能有一个直接父类 ...
- 畅通project续
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) ...
- Lync 2013 与Exchange 2013 UM&UC 集成!
设置好对应的拨号计划.我们设置分机号码为4位: 配置好接入号码为5000: 配置自己主动助理号码为6000: 改动UM拨号模式为双模式: Set-UMService -identity Exch ...
- Java线程池的简单使用
最近由于公司的业务需求,需要使用线程池来进行对数据进行处理,所以就简单的学习了一下线程池的东西,刚接触感觉挺难的,不过使用了就不感觉那么难了,还是蛮简单的, package com.yd.sms.jo ...
- PHP根据两点间的经纬度计算距离
/** * 说明: 根据两点间的经纬度计算距离 * @param float $lat 纬度值 * @param float $lng 经度值 */ function getDistance($lat ...
- 暴力破解zip文件
#coding=utf-8 """ 用户输入-z参数指定要破解的zip文件,输入-d参数输入字典文件,即可暴力破解加密的zip文件 """ ...
- tcp与socket关系
套接字(socket)是通信的基石,是支持TCP/IP协议的网络通信的基本操作单元.
- sabaki and leelazero
https://tieba.baidu.com/p/5462772621?see_lz=1 http://zero.sjeng.org/ https://www.jianshu.com/p/a4ba1 ...
- YTU 2915: Shape系列-1
2915: Shape系列-1 时间限制: 1 Sec 内存限制: 128 MB 提交: 283 解决: 221 题目描述 小强开始迷恋彩色的Shape,于是决定做一个Shape类.Shape类有 ...