好吧。。。暴力是那么的简单。。。。
#include<stdio.h>
#include<math.h>
int main()
{int s[30]={3,5,8,12,20,34,57,98,170,300,536,966,1754,3210,5910,10944,20366,38064,71421,134480,254016};int n;while(scanf("%d",&n)&&n){printf("%d\n",s[(n-1960)/10]);}return 0;
}
好吧。。。暴力是那么的简单。。。。
#include<stdio.h>
#include<math.h>
int main()
{int s[30]={3,5,8,12,20,34,57,98,170,300,536,966,1754,3210,5910,10944,20366,38064,71421,134480,254016};int n;while(scanf("%d",&n)&&n){printf("%d\n",s[(n-1960)/10]);}return 0;
}