I thought,
1. if A and B has same sign ,
2. K is minus in A + BK = 0.
but how can i upgrade my process from O(n^3) to O(n^2) or O(n)?
I used three loop ( n^2 * pp ) , but i couldn't find out more good algrothm.
Plsase suggest me something better

-JSKim@CAC wrote-