作者tml (流刑人形)
看板puzzle
標題ProjectEuler 455 Powers With Trailing Digits
時間Tue Feb 25 07:11:06 2014
455. Powers With Trailing Digits
http://projecteuler.net/problem=455
令f(n)為比10^9小的最大的正整數x使得n^x的最後9位數亦為x(包含補位的0),或是0
如果這個x不存在。
例如
‧f(4) = 411728896 (4^411728896 = ...490
411728896)
‧f(10) = 0
‧f(157) = 743757 (157^743757 = ...567
000743757)
‧Σf(n)對2≦n≦10^3的和 = 442530011399
請求出Σf(n)對2≦n≦10^6的和。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 129.2.129.154
推 LPH66:f(157) 那行的 *[1;31 少了 m 02/25 10:31
→ LPH66:唔, 好像是整個著色亂了 XD 02/25 10:31
※ 編輯: tml 來自: 129.2.129.154 (02/25 19:46)
→ tml:少加了一個結尾...已修正 02/25 19:46