Chemistry

来源:互联网 发布:苍神录java下载 编辑:程序博客网 时间:2024/05/25 12:20
Time Limit: 2000ms, Special Time Limit:5000ms,Memory Limit:262144KBTotal submit users: 33, Accepted users:29Problem 12907 : No special judgementProblem description


Input

The only line of the input file contains a single integer number n — the number of carbon atoms in alkane molecule (1 ≤ n ≤ 50).


Output

The only line of output file should contain the number of different CnH2n+2i somers. It is guaranteed that the answer fits signed 64-bit integer type.


Sample Input
612
Sample Output
5355
#include<stdio.h>#define ll __int64ll a[51];int main(){    a[0]=0;a[1]=1;a[2]=1;a[3]=1;a[4]=2;a[5]=3;a[6]=5;a[7]=9;a[8]=18;a[9]=35;a[10]=75;a[11]=159;a[12]=355;a[13]=802;a[14]=1858;a[15]=4347;a[16]=10359;a[17]=24894;a[18]=60523;a[19]=148284;a[20]=366319;a[21]=910726;a[22]=2278658;a[23]=5731580;a[24]=14490245 ;a[25]=36797588;a[26]=93839412;a[27]=240215803 ;a[28]=617105614 ;a[29]=1590507121 ;a[30]=4111846763;a[31]=10660307791 ;a[32]=27711253769;a[33]=72214088660 ;a[34]=188626236139 ;a[35]=493782952902;a[36]=1295297588128;a[37]=3404490780161;a[38]=8964747474595;a[39]=23647478933969 ;a[40]=62481801147341 ;a[41]=165351455535782;a[42]=438242894769226 ;a[43]=1163169707886427;a[44]=3091461011836856;a[45]=8227162372221203;a[46]=21921834086683418 ;a[47]=58481806621987010 ;a[48]=156192366474590639;a[49]=417612400765382272 ;a[50]=1117743651746953270;int n;while(scanf("%d",&n)!=EOF)   printf("%I64d\n",a[n]);return 0;}


0 0
原创粉丝点击