text: it will use extended Eucledian algorithm or Fermats Little Theorem for calculation . MMI of 120 under division by 1000000007 will be 808333339
code: for ( int i = 0 ; i < 5 ; i ++ ) ans = ( ans * ( 55555 - i ) ) % 1000000007 ; ans = ( ans * i ) % 1000000007 ; cout << " Answer ▁ using ▁ naive ▁ method : ▁ " << naive_answer << endl ; cout << " Answer ▁ using ▁ multiplicative " << " ▁ modular ▁ inverse ▁ concept : ▁ " << ans ; return 0 ; }