#include "iostream" #include "algorithm" using namespace std; int main() { int n; while (cin >> n) { int num[1000] = { 0 }; //存每一位数的种类 for (int i = 1; i <= n; i++) { for (int j = 1; j <= i / 2; j++) { num[i] = num[i] + num[j]; //每一位叠加 } num[i]++; //加上本身 } cout << num[n] << endl; } return 0; }
0.0分
1 人评分
人见人爱A+B (C语言代码)浏览:766 |
Minesweeper (C语言代码)浏览:805 |
点我有惊喜!你懂得!浏览:1068 |
C语言训练-邮票组合问题* (C语言代码)......浏览:645 |
C语言考试练习题_排列 (C++代码)浏览:629 |
C语言程序设计教程(第三版)课后习题8.4 (Java代码)浏览:728 |
C二级辅导-进制转换 (C语言代码)浏览:615 |
C语言程序设计教程(第三版)课后习题8.9 (Java代码)浏览:1325 |
矩阵乘法 (C++代码)浏览:1458 |
上车人数 (C语言代码)浏览:777 |