ProjectEuler 466 Distinct terms in a m - 拼圖

Table of Contents

466. Distinct terms in a multiplication table

http://projecteuler.net/problem=466

令P(m,n)為m ×n乘法表中相異的數字個數。

例如,一個3 ×4乘法表如下所示

  × 1 2 3 4
  1 1 2 3 4
  2 2 4 6 8
  3 3 6 9 12

它有8個相異數字{1,2,3,4,6,8,9,12},故P(3,4) = 8。

已知:
P(64,64) = 1263、
P(12,345) = 1998以及
P(32,10^15) = 13826382602124302。

請求出P(64,10^16)。

--

All Comments