Power function in log n
static void power ( int [ , ] F , int n ) { if ( n == 0 n == 1 ) { return ; } int [ , ] M = { { 1 , 1 } , { 1 , 0 } } ; power ( F , n / 2 ) ; multiply ( F , F ) ; if ( n % 2 != 0 ) { multiply ( F , M ) ; } }