HDU 5675 ztr loves math
ztr loves math
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 896 Accepted Submission(s): 347
He wanted to know that ,for a given number n,is there a positive integer solutions?
The first line of input contains an positive integer T(T <= 106) indicating the number of test cases.
For each test case:each line contains a positive integer, n <= 1018.
If there be a positive integer solutions,print "True", else print "False".
False
For the fourth case,$105 = 13^{2}-8^{2}$
#include <cstdio> long long n;
int t; int main()
{
scanf("%d",&t);
while(t--){
scanf("%I64d",&n);
if(n == || n == || n% == )
printf("False\n");
else
printf("True\n");
}
return ;
}
HDU 5675 ztr loves math的更多相关文章
- HDU 5675 ztr loves math (数学推导)
ztr loves math 题目链接: http://acm.hust.edu.cn/vjudge/contest/123316#problem/A Description ztr loves re ...
- hdu 5675 ztr loves math(数学技巧)
Problem Description ztr loves research Math.One day,He thought about the "Lower Edition" o ...
- HDU 5677 ztr loves substring(Manacher+dp+二进制分解)
题目链接:HDU 5677 ztr loves substring 题意:有n个字符串,任选k个回文子串,问其长度之和能否等于L. 题解:用manacher算法求出所有回文子串的长度,并记录各长度回文 ...
- hdu-5675 ztr loves math(数学)
题目链接: ztr loves math Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Othe ...
- HDU 5677 ztr loves substring(回文串加多重背包)
ztr loves substring Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Othe ...
- HDU 5676 ztr loves lucky numbers (模拟)
ztr loves lucky numbers 题目链接: http://acm.hust.edu.cn/vjudge/contest/121332#problem/I Description ztr ...
- hdu 5676 ztr loves lucky numbers(dfs+离线)
Problem Description ztr loves lucky numbers. Everybody knows that positive integers are lucky if the ...
- hdu 5676 ztr loves lucky numbers 打表+二分
ztr loves lucky numbers Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/ ...
- hdu 5677 ztr loves substring 多重背包
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission( ...
随机推荐
- Java中的break与continue区别
break跳出当前循环执行循环下面的程序, 如果break出现在嵌套循环的内层循环, 则break语句只会跳出当前层的循环; 当程序执行到continue时时, 则跳过本次循环程序重新回到循环开始继续 ...
- js按钮点击展开收起
$('.tab').click(function(){ var index = $('.tab').index(this), //缓存第一次点击的li的索引值 ele = $(this).find(' ...
- js常识
btnDelAll.Attributes.Add("onclick", "<script lunguage='javascript'>return windo ...
- PHP 性能分析第三篇: 性能调优实战
注意:本文是我们的 PHP 性能分析系列的第三篇,点此阅读 PHP 性能分析第一篇: XHProf & XHGui 介绍 ,或 PHP 性能分析第二篇: 深入研究 XHGui. 在本系列的 ...
- c++ ANSI、UNICODE、UTF8互转
static std::wstring MBytesToWString(const char* lpcszString); static std::string WStringToMBy ...
- DLL 支持MFC 没有DLLMAIN函数
如果使用VC编写DLL时,需要MFC功能: 一般在源文件里就不能手动写DLLMAIN函数了 它给MFC集成了,\src\mfc\dllmodule.cpp打开它,里面有有一个DLLMAIN函数,根据源 ...
- CodeForce 339:A+B+C
A题:水题.. #include<stdio.h> #include<string.h> ; char s[ maxn ]; int main(){ //freopen(&qu ...
- Nginx开启Gzip压缩大幅提高页面加载速度(转)
转自:http://www.cnblogs.com/mitang/p/4477220.html 刚刚给博客加了一个500px相册插件,lightbox引入了很多js文件和css文件,页面一下子看起来非 ...
- 关于static继承的问题
c++primer 15.2.7节关于static继承的意思是,父类和子类共享static函数或者static成员变量,并且子类要访问还要受它们的权限限制,下面是看到的另一个例子 class Base ...
- [java]2015上海邀请赛 B Base64
题意: 给n和一个字符串(可以有空格) 求字符串编码n次后的字符串 编码方式:字符串的每个字符转化成ASCII码, ASCII码转化成8位2进制, 将二进制数分割成6位为一组的(不够的补0), ...