数学: HDU1098 Ignatius's puzzle】的更多相关文章

Ignatius's puzzle Time 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…
Ignatius's puzzle 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)=5x13+13*x5+ka*x,input a nonegative integer k(k<10000),to find the minimal none…
Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4935    Accepted Submission(s): 3359 Problem Description Ignatius is poor at math,he falls across a puzzle problem,so he has no…
Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5035    Accepted Submission(s): 3426 Problem Description Ignatius is poor at math,he falls across a puzzle problem,so he has no…
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…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1098 题目中文是这样的: 伊格内修斯在数学上很差,他遇到了一个难题,所以他别无选择,只能上诉埃迪. 这个问题描述:f(x)= 5 * x ^ 13 + 13 * x ^ 5 + k * a * x,输入一个非正整数k(k <10000),找到最小非负整数a, 使得任意的整数x,65 | f(x)如果不存在那个a,就打印“否”. 输入 输入包含多个测试用例. 每个测试用例由非负整数k组成,样例输入中有…
题目大意: 给定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 因为x可以任意取 那么不能总是满足 65|x 那么必须是 65 | (5*x^12 + 13 * x^4 + ak) 那么就是说 x^12 / 13 + x^4 / 5 + ak / 65 正好是一个整数 假设能找到满足的a , 那么将 ak / 65 分进x^12 / 13 + x^4 / 5中得到…
以下引用自http://acm.hdu.edu.cn/discuss/problem/post/reply.php?postid=8466&messageid=2&deep=1 题意以及简单证明Posted by hncu1106101-王志盼 at 2012-10-19 16:35:42 on Problem 1098 有一个函数: f(x)=5*x^13+13*x^5+k*a*x给定一个非负的 k 值 求最小的非负的 a 值 使得对任意的整数x都能使 f(x) 被 65 整除. 每输入…
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等于0. 思路: 这个题我也不是很会,看了网上的思路才做的. http://www.cnblogs.com/g0feng/archive/2012/08/23/2652996.html //HDU 1098 #include <iostream> #include <stdio.h> u…
数学归纳法,得证只需求得使18+ka被64整除的a.且a不超过65. #include <stdio.h> int main() { int i, j, k; while (scanf("%d", &k) != EOF) { j = ; ; i<; i++) { +k*i) % == ) { j = ; break; } } if (j) printf("%d\n", i); else printf("no\n"); }…