Sunday, June 10, 2012

UVA Solution for 10223

//10223
#include<stdio.h>
int main()
{
    long x[19]={ 1,2,5,14,42,132,429,1430,4862,16796,58786,208012,742900,
2674440,9694845,35357670,129644790,477638700,1767263190 };
long n,i;
while(scanf("%ld",&n)==1)
{
for(i=0;i<19;i++)
  {
  if(n==x[i])

   {
            
 printf("%ld\n",i+1);
  break;
    }
  }
}
}