ProjectEuler 458 Permutations of Project - 拼圖

Table of Contents

458. Permutations of Project

http://projecteuler.net/problem=458

令A為組成project這個單字的字母的集合,亦即A = {c,e,j,o,p,r,t}。

令T(n)由A裡面的元素組成長度為n的字串、並且不包含由project這個單字的5040種重排

作為其子字串的字串總數。

T(7) = 7^7 - 7! = 818503。

請求出T(10^12),並給出末9位數作為答案。

--

All Comments