标签:style color os strong io for 问题 代码
#include<iostream> using namespace std; int n,k; int f(int a,int b,int c) { int g = 0,i; if (b == 1) g = 1; else for (i = c; i <= a/b; i++) g += f(a-i,b-1,i); return g; } int main() { while(cin >> n >> k) cout << f(n,k,1)<<endl; return 0; }
标签:style color os strong io for 问题 代码
原文地址:http://blog.csdn.net/u014760201/article/details/38226629