- #define MAX 10000
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int n;
- int i,j,k;
- char result[MAX];
- char tmp[MAX];
- while(scanf("%d",&n)!=EOF){
- if(n==0){
- printf("1/n");
- continue;
- }
- memset(result,'0',MAX);
- memset(tmp,'0',MAX);
- tmp[0]='1';
- for(i=1;i<=n;i++){
- memset(result,'0',MAX);
- for(j=0;j<i;j++){
- for(k=0;k<MAX;k++){
- result[k]=result[k]+(tmp[k]-48);
- if(result[k]>57){
- result[k+1]=result[k+1]+(result[k]-48)/10;
- result[k]=result[k]-(result[k]-48)/10*10;
- }
- }
- }
- memcpy(tmp,result,MAX);
- }
- for(i=MAX-1;i>=0;i--)
- if(result[i]!='0')break;
- for(;i>=0;i--)printf("%c",result[i]);
- printf("/n");
- }
- }
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</script>