Re: [algogeeks] Re: Power(n^n)

2012-06-14 Thread Prakhar Jain
Typo in this problem statement. K is not less than or equal to 1000. Only N=1000. K can be as big as 1000^1000,i.e. 1000 digits. -- Prakhar Jain IIIT Allahabad B.Tech IT 3rd Year Mob no: +91 9454992196 E-mail: rit2009...@iiita.ac.in jprakha...@gmail.com On Tue, Jun 12, 2012 at

Re: [algogeeks] Re: Power(n^n)

2012-06-12 Thread hary rathor
there would no problem of rang if K^(1/N)==N -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: Power(n^n)

2012-06-11 Thread Guneesh Paul Singh
@abhisheikh read the problem statement again...it says 1000 digits not 1000 value.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: Power(n^n)

2012-06-11 Thread saurabh singh
@Guneesh Actually he says But 0=N , K=1000 so N^N could be have 1000 digits. I think this assertion is wrong.. @dave sir.. The second part of question still remains unanswered.Is there any mathematical property... Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com

Re: [algogeeks] Re: Power(n^n)

2012-06-11 Thread rammar
@Guneesh But 0=N , K=1000 so N^N could be have 1000 digits. There is no direct upper bound on N, but there is an upper bound on K (i.e. K = 1000). And we need to check N^N == K, so N^N cant be more than 1000. On Monday, June 11, 2012 1:56:13 PM UTC+5:30, Guneesh wrote: @abhisheikh read the

Re: [algogeeks] Re: Power(n^n)

2012-06-11 Thread Dave
@Bashrc: The mathematical property is as I gave it: 0 = N = 4. Dave On Monday, June 11, 2012 4:43:21 AM UTC-5, .bashrc wrote: @Guneesh Actually he says But 0=N , K=1000 so N^N could be have 1000 digits. I think this assertion is wrong.. @dave sir.. The second part of question still remains

Re: [algogeeks] Re: Power(n^n)

2012-06-08 Thread Abhishek Sharma
You don't need to use BigNum or long int for this program. Both n k should be less than 1000. Since there is no restriction on k,you don't need Bignum Since both n,k are restricted,you don't need bignum. if n5, simply reject the input and return false On Fri, Jun 8, 2012 at 11:01 AM, Dave

Re: [algogeeks] Re: Power(n^n)

2012-06-08 Thread Abhishek Sharma
Ignore the last post. Updated: You don't need to use BigNum or long int for this program. Both n k should be less than 1000. you need bignum only if there would be no restriction on k. Since both n,k are restricted, you don't need bignum. if n5( 5^5 1000), simply reject the input and return

[algogeeks] Re: Power(n^n)

2012-06-07 Thread Dave
@victor: But if K = 1000, then the largest N you have to deal with is 4, since 4^4 1000 but 5^5 1000. So your code looks like this: int IsNtoNEqualK( int N, int K) { return (N==1)(K==1) || (N==2)(K==4) || (N==3){K==27) || (N==4)(K==256); } On Thursday, June 7, 2012 5:14:00 PM UTC-5,