Блог пользователя umsh1ume

Автор umsh1ume, история, 8 лет назад, По-английски

I was trying to find binomial co-efficient nCr mod 1000000007 (n and r are large) using inverse modulo but there is some error. What is the problem in this code? https://ideone.com/SWPmty

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Well I'd suggest that you rename your power function

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

pow() is already a library function which returns a double instead of an int , which may be giving wrong answer after typecasting to int .