// Problem#: 1564
// Submission#: 1663047
// The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
// URI: http://creativecommons.org/licenses/by-nc-sa/3.0/
// All Copyright reserved by Informatic Lab of Sun Yat-sen University
//1564
#include <stdio.h>
#include <iostream>
using namespace std;
int m(int n,int pre)
{
int res = 0;
for (int i = pre; ;i++)
{
if (i <= n - i)
{
res++;
res += m(n-i,i);
}
else
break;
}
return res;
}
int main()
{
int n;
while (scanf ("%d",&n) != EOF)
printf ("%d\n", m(n,5) + 1);
return 0;
}
sicily 1564 HOUSING
最新推荐文章于 2019-08-17 09:31:27 发布