Advertisement
noshin98

uva 10223

Jul 14th, 2016
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long int s[19]={1,2,5,14,42,132,429,1430,4862,16796,58786,208012,742900,2674440,9694845,35357670,129644790,477638700,1767263190};
  5.     int  n,i;
  6.     while(scanf("%d",&n)==1)
  7.     {
  8.         for(i=0;i<19;i++)
  9.         {
  10.             if(n==s[i])
  11.             {
  12.                 printf("%d\n",i+1);
  13.                 break;
  14.  
  15.             }
  16.         }
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement