I solve recurrence equation by using characteristic equation
F(n) = c1*pow(Phi, n) + c2*pow(phi, n); by
c2 = ( fp*pow(Phi, q) - fq*pow(Phi, p) )/( pow(Phi, q)*pow(phi, p) - pow(Phi, p)*pow(phi, q) );
c1 = ( fq - c2*pow(phi, q) ) / pow(Phi, q);
i use long double to keep and round the answer but i got WA in test case 12. Anyone can help me please?