hdu1098
Ignatius is poor at math,he falls across a puzzle problem,so he has no choice but to appeal to Eddy. this problem describes that:f(x)=5*x^13+13*x^5+k*a*x,input a nonegative integer k(k<10000),to find the minimal nonegative integer a,make the arbitrary integer x ,65|f(x)if
no exists that a,then print "no".
#include<stdio.h>
int main()
{
int n,a,k;
while(scanf("%d",&k)!=EOF)
{
for(a=;a<=;a++)
{
if((+a*k)%==)
{
printf("%d\n",a);
break;
}
}
if(a>=)
printf("no\n");
}
return;
}
hdu1098的更多相关文章
- Hdu-1098解题报告
Hdu-1098解题报告 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1098 题意:已知存在一个等式f(x)=5*x^13+13*x^5+k*a*x ...
- 数学: HDU1098 Ignatius's puzzle
Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- OJ题目分类
POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 P ...
随机推荐
- js 实现json数组集合去重,差集,并集,交集。
let list = [ { id: "1", content: "A" }, { id: "2", content: "B&qu ...
- 14: InfluxDB+Grafana打造大数据监控利器
参考博客: https://www.cnblogs.com/davidwang456/p/7795263.html
- [ERROR] --gtid-mode=ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates
centos7.5 做基于GTID的主从重启从库报错 问题: [root@db01-51 ~]# tail -50 /application/mysql/data/db01-51.err 2019-0 ...
- JS(JavaScript)的进一步了解6(更新中···)
元素的属性 div.attributes 是所有标签属性构成的数据集合 div.classList 是所有class名构成的数组集合 在classList的原型链上看以看到add()和remove() ...
- HTML与CSS的一些知识(一)
一般写代码的时候,总会有些小错误.为了便于修改以及查找,所以代码格式要写规范,而且一定一定要写注释.因为有时候代码写得多了,真的连自己都找不到自己要找的东西在哪里.还有命名也要见名知意. 再说一些HT ...
- 彻底清除 Windows 服务
如果服务已经停止, 或从注册表中删除, 但是在任务管理器中仍能看到服务躺在列表里面. 只需要找到服务的PID, 然后运行命令: taskkill /PID 服务的PID /f 即可.
- 论文笔记:Learning Attribute-Specific Representations for Visual Tracking
Learning Attribute-Specific Representations for Visual Tracking AAAI-2019 Paper:http://faculty.ucmer ...
- 第一次跑eureka
- 《内蒙古自治区第十三届大学生程序设计竞赛试题_H 公孙玉龙》
这个题有点小坑,最坑的地方就是 输入的b 变量 有可能 是 负数 ! 负数 ! 负数! 对 ,你没有看错,就是负数,坑死我了, 一直都是 content.charAt(0) 判断 ...
- zookeeper调试命令
转载自 https://www.cnblogs.com/andy6/p/7674028.html 一.zkServer.sh 1.查看 zkServer.sh 帮助信息[root@bigdata05 ...