Project Euler 474 Last digits of divis - 拼圖

Table of Contents

474. Last digits of divisors

http://projecteuler.net/problem=474

我們定義函數F(n,d)為n的因數中,末幾位數為d的個數。

例如:
  F(84,4) = 3.

  因為84的因數有:{1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84}

  當中有三個數{4,14,84}末位數為4

除此之外,我們也能夠驗證出F(12!,12) = 11 以及 F(50!,123) = 17888

請求出 F(1000000!,65432) 除以 (10^16 + 61) 的餘數

--

All Comments

Lily avatarLily2014-06-02
I solved it and the program running time is 40 sec.
Lydia avatarLydia2014-06-03
原po速度好快;有沒有興趣挑戰一下Gold Medal?
台灣目前還沒有人拿到Gold Medal
Yedda avatarYedda2014-06-05
現在我Project Euler的目標正是挑戰Gold Medal
Gary avatarGary2014-06-09
但感覺運氣成分居多@@