数学归纳法题:(Problem ID:1098)
来源:互联网 发布:linux配置vnc centos 编辑:程序博客网 时间:2024/05/16 05:06
简单数学归纳题:
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)ifno 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
11
100
9999
Sample Output
22
no
43
AC代码:
#include<stdio.h>#include<math.h>int main(){int a,k;while(scanf("%d",&k)!=EOF){for(a=0;a<10000;a++){if((18+k*a)%65==0){printf("%d\n",a);break;}}if(a>=10000)printf("no\n"); }return 0;}
1 0
- 数学归纳法题:(Problem ID:1098)
- hdu 1098 数学归纳法
- HDU 1098 数学归纳法
- hdu1098(数学归纳法)
- 数学归纳法(诡辩)
- 数学归纳法(1.2.1)
- A1 = ? (数学归纳法)
- HDU 1098 Ignatius's puzzle(数学归纳法)
- 数学归纳法
- 数学归纳法
- 数学归纳法
- 数学归纳法
- hdu 1098 数学归纳法 二项式定理
- hdu 4104 Discount (思维 数学归纳法)
- 平均值不等式证明(数学归纳法)
- 直线分割平面问题(数学归纳法)
- 洗牌算法的随机性(数学归纳法)
- 数学归纳法及其证明(读书笔记——什么是数学)
- Android Studio 使用技巧
- jQuery效果之选项卡一
- jQuery效果之选项卡二
- jQuery效果之选项卡三
- Stereo Matching文献笔记之(九):经典算法Semi-Global Matching(SGM)之神奇的HMI代价计算~
- 数学归纳法题:(Problem ID:1098)
- jQuery效果之滑动面板
- 进制介绍与进制之间的转换
- 老鼠和猫换食物题:(Problem ID:1009)
- 工作中不要总是问什么是什么!
- Qt中使用到的设计模式之反射模式
- Python常用方法(一)
- leetcode-49 Group Anagrams 同位词字典序排序
- Maven是什么