数学: HDU1098 Ignatius's puzzle
|
|
Ignatius's puzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9934 Accepted Submission(s): 6959
Problem Description
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".
Input
The input contains several test cases. Each test case consists of a nonegative integer k, More details in the Sample Input.
Output
The output contains a string "no",if you can't find a,or you should output a line contains the a.More details in the Sample Output.
Sample Input
Sample Output
Author
eddy
Problem : 1098 ( Ignatius's puzzle ) Judge Status : Accepted
RunId : 21248504 Language : G++ Author : hnustwanghe Code Render Status : Rendered By HDOJ G++ Code Render Version 0.01 Beta #include<iostream> using namespace std; int main(){ #include<iostream> |
数学: HDU1098 Ignatius's puzzle的更多相关文章
- 数学--数论--HDU 1098 Ignatius's puzzle (费马小定理+打表)
Ignatius's puzzle Problem Description Ignatius is poor at math,he falls across a puzzle problem,so h ...
- Ignatius's puzzle
Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- HDUOJ-----1098 Ignatius's puzzle
Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- HDOJ 1098 Ignatius's puzzle
Problem Description Ignatius is poor at math,he falls across a puzzle problem,so he has no choice bu ...
- 题解报告:hdu 1098 Ignatius's puzzle
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1098 题目中文是这样的: 伊格内修斯在数学上很差,他遇到了一个难题,所以他别无选择,只能上诉埃迪. 这 ...
- HDU 1098 Ignatius's puzzle 费马小定理+扩展欧几里德算法
题目大意: 给定k,找到一个满足的a使任意的x都满足 f(x)=5*x^13+13*x^5+k*a*x 被65整除 推证: f(x) = (5*x^12 + 13 * x^4 + ak) * x 因为 ...
- HDU 1098 Ignatius's puzzle(数学归纳)
以下引用自http://acm.hdu.edu.cn/discuss/problem/post/reply.php?postid=8466&messageid=2&deep=1 题意以 ...
- HDU 1098 Ignatius's puzzle
http://acm.hdu.edu.cn/showproblem.php?pid=1098 题意 :输入一个K,让你找一个a,使得f(x)=5*x^13+13*x^5+k*a*x这个f(x)%65等 ...
- 【HDOJ】1098 Ignatius's puzzle
数学归纳法,得证只需求得使18+ka被64整除的a.且a不超过65. #include <stdio.h> int main() { int i, j, k; while (scanf(& ...
随机推荐
- STL::allocator rebind
阅读侯捷的STL源码剖析时,发现在allocator类的代码中有这样一个struct template<class T> class allocator { ... template< ...
- AOP aspect XML 配置
/** * 00配置接入点:定义一个切入点 * execution(* com.foen.foensys.controller..*.*(..))") "*" 第一个* ...
- springmvc+ajax异步上传图片
1.javaweb传统的上传图片方式就是通过form表单提交 <form action="#" method="post" enctype="m ...
- Luogu P3408 恋爱
题目链接:Click here Solution: 设f[x]表示要使x向它的父亲写信需要花的最少的钱,per[x]为要使x向它的父亲写信最少要多少人 则\(f[x]=\sum_{i=1}^{per[ ...
- 设置获取data-*属性值
html代码如下: <div id="getId" data-id="122" data-vice-id="11">获取id&l ...
- LNK1104 无法打开文件“proj.lib”
两种可能: 1.proj.lib不存在 2.proj.lib不符合编译的debug(release)版本
- Python3学习笔记(六):字符串
一.基本字符串操作 所有标准的序列操作(索引.分片.乘法.判断成员资格.求长度.取最小值和最大值)对字符串同样适用.但是字符串是不可改变的. 二.字符串格式化 字符串格式化使用字符串格式化操作符(%) ...
- (59)Linux操作系统深入应用
目录: 第一部分:嵌入式的含义 第二部分:DOS命令 第三部分:linux的发展历史(与unix的关系) 第四部分: 基于ubuntu下的linux命令详解大全 第一部分:嵌入式的含义 ...
- Mybatis 中在xxx.mapper书写模糊查询
1.在mybatis中,书写sql,有时候会有一些不细心,如: <!-- 首页商品 关键字搜索--> <select id="getGoodsByLikeTitle&quo ...
- 【Python】学习笔记十四:循环进阶
range() 在Python中,for循环后的in跟随一个序列的话,循环每次使用的序列元素,而不是序列的下标. 我们继续开发range的功能,以实现下标对循环的控制: s = 'abcdefghj' ...