多项式的猜想
来源:互联网 发布:mac版fps游戏 编辑:程序博客网 时间:2024/05/16 18:04
#include <stdio.h>#include <stdlib.h>int getA ( int n ){ //得到每一项 if ( n == 1 || n == 2 ) { return 1; } else { return 2 * getA ( n - 1 ) + getA ( n - 2 ); }}int getS ( int n ){ //得到前n项的和 int i, s = 0; for ( i = 1; i <= n; i++ ) { s += getA ( i ); } return s;}int main(){ int j, k = 100; while ( k <= 10000 ) { for ( j = 1; j < 10000; j++ ) { if ( getS ( j ) < k && getS ( j + 1 ) >= k ) { printf ( "%d\n", j ); break; } } k *= 10; } return 0;}
阅读全文
0 0
- 多项式的猜想
- 多项式的猜想
- 数学猜想的罗生门
- 猜想互联网的服务业
- 李米的猜想?
- 李米的猜想
- 李米的猜想
- 李米的猜想
- 小狗的猜想
- 未来的两个猜想
- 哥德巴赫猜想的解析
- 奇怪的猜想
- 关于宇宙的猜想
- 腾讯的LBS猜想
- 明天的猜想
- 关于计算机世界的猜想
- 哥德巴赫猜想的拓展
- 哥德巴赫猜想的拓展
- Improving Deep Neural Networks学习笔记(三)
- struts1 使用说明
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- Integer.valueOf和Integer.parseInt及new Integer()的区别
- csdn如何转载别人的文章
- 多项式的猜想
- 递归之小游戏
- S3C2440移植u-boot之配置开发环境
- Struts2页面资源路径修改后还是不改变,Ctrl+shift+delete浏览器缓存删除即可。
- 第三节 hive之元数据
- 选择排序(直接选择排序,堆排序)
- Leetcode#66. Plus One &&Add Binary (大数)
- 【数据结构笔记】二叉树的基本操作
- java发送url的一种方法,使用 HttpClient来实现