
#include<iostream>
using namespace std;
int main(){
int n;
while(cin>>n){
int ans=0;
for(int i=0;i<=n/3;i++){
//对3的个数进行枚举
int temp=(n-3*i);
//除了这i个3之外剩余的钱数
//temp/2,剩余部分换成2的总种类数,
ans+=temp/2+1;
//这个1,是指只有i个3,其余都是1的情况
}
cout<<ans<<endl;
}
return 0;
}
372


&spm=1001.2101.3001.11974&articleId=83817882&d=1&t=3&u=cfba0e9bcba947f5a7301c1dd4110540)

被折叠的 条评论
为什么被折叠?



