Page 1 of 2

11000 Why AC?

Posted: Thu Mar 09, 2006 2:24 pm
by Psyco
My program is print N Fibonachi -1, N+1 Fibonachi -1.

Is it OK?

I am 0.000 and AC!

I'm confused...-_-;;;

check = 11321 :o :o

Posted: Thu Mar 09, 2006 2:38 pm
by david
Yes, it is correct.
Suppose there are f[n] - 1 male bees and f[n+1] - 1 bees in total. Then there are f[n - 1] female bees, and next year there will be 1 + f[n] - 1 = f[n] female bees and f[n-1] + f[n] - 1 = f[n + 1] - 1 male ones.

11000 - Bee

Posted: Sun Mar 12, 2006 11:15 am
by tmdrbs6584
n_st Fibonacci-1?
I'ts so easy to solve the problem!

Posted: Tue Mar 14, 2006 9:45 pm
by shalinmangar
Is it really?

Posted: Tue Mar 14, 2006 11:13 pm
by sclo
This problem is supposed to be trivial, we don't even need big int

Posted: Wed Mar 15, 2006 12:25 pm
by shalinmangar
Yes, I got AC. I saw the problem after seeing this post so my thoughts were pretty biased. It was trivial.

Posted: Sun Mar 19, 2006 2:23 am
by tmdrbs6584
but you must use long long int!!

Posted: Sat Mar 25, 2006 5:24 pm
by neno_uci
Actually I've got Accepted using unsigned int :wink:

Can someone give me sample inputs please

Posted: Sat Jul 14, 2007 11:54 am
by abhiramn
What is wrong with my program???

Code: Select all

ACCEPTED!!!
Please please reply.!

wa in 11000

Posted: Sun Aug 26, 2007 7:56 am
by dipaly
its an easy prob ... but i got wa .....
i just calculate the ( n th fibonacci -1 ) , (n+1 th fibonacci - 1)

here is my function ...

Code: Select all

long long a=1,b=1, male=0,total=0;	  
		
		for(long long i=1 ; i<=n ; i++)
		{
			male = a+b-1;
			long long t =a;
			a = b; 
			b = b+t;
			total = a+b-1;
		}
is my fibonacci function correct ????

& whats the ans of input 0
i think its ans is 0 1
??? plz help :oops:

Posted: Tue Aug 28, 2007 2:03 pm
by Jan
Your assumption is correct as well as your code. May be there is a problem with your implementation (which is not posted here).

PS: Is there any problem with posting full code?

:( still wa

Posted: Sun Sep 02, 2007 12:42 pm
by dipaly
PS: Is there any problem with posting full code?
I don't know ..Here is my code


ac

sorry 4 posting my [/code]

Posted: Sun Sep 02, 2007 7:24 pm
by Jan
That's quite strange. Use

Code: Select all

    if(n==0) 
         printf("0 1\n");
May be there is a problem with the conversion!

Re: :( still wa

Posted: Mon Sep 03, 2007 6:47 am
by dipaly
thanks ac now !!!!!! im realy a stupid[/quote]

Posted: Fri Dec 14, 2007 8:08 pm
by scott1991
can anyone see what's wrong with this?

Code: Select all

AC now. Thanks!!
Cheers. Scott