ProjectEuler 480 The Last Question - 拼圖
By Victoria
at 2014-09-14T11:35
at 2014-09-14T11:35
Table of Contents
480. The Last Question
https://projecteuler.net/problem=480
考慮所有由下列字串中以任意順序挑選任意文字組成的字串的集合:
thereisasyetinsufficientdataforameaningfulanswer
將此集合中字串長度不超過15的挑出,並依字典順序加以排序並編號,則此一序列包含:
項次:字串內容
1 : a
2 : aa
3 : aaa
4 : aaaa
5 : aaaaa
6 : aaaaaa
7 : aaaaaac
8 : aaaaaacd
9 : aaaaaacde
10 : aaaaaacdee
11 : aaaaaacdeee
12 : aaaaaacdeeee
13 : aaaaaacdeeeee
14 : aaaaaacdeeeeee
15 : aaaaaacdeeeeeef
16 : aaaaaacdeeeeeeg
17 : aaaaaacdeeeeeeh
...
28 : aaaaaacdeeeeeey
29 : aaaaaacdeeeeef
30 : aaaaaacdeeeeefe
...
115246685191495242: euleoywuttttsss
115246685191495243: euler
115246685191495244: eulera
...
525069350231428029: ywuuttttssssrrr
定義P(w)為字串w的項次
定義W(p)為項次p的字串內容
可以看出P(w)和W(p)互為反函數,P(W(p)) = p以及W(P(w)) = w。
舉例:
W(10) = aaaaaacdee
P(aaaaaacdee) = 10
W(115246685191495243) = euler
P(euler) = 115246685191495243
請求出W(P(legionary) + P(calorimeters) - P(annihilate)
+ P(orchestrated) - P(fluttering))。
請用小寫字母表達答案(不加標點或空白)。
--
https://projecteuler.net/problem=480
考慮所有由下列字串中以任意順序挑選任意文字組成的字串的集合:
thereisasyetinsufficientdataforameaningfulanswer
將此集合中字串長度不超過15的挑出,並依字典順序加以排序並編號,則此一序列包含:
項次:字串內容
1 : a
2 : aa
3 : aaa
4 : aaaa
5 : aaaaa
6 : aaaaaa
7 : aaaaaac
8 : aaaaaacd
9 : aaaaaacde
10 : aaaaaacdee
11 : aaaaaacdeee
12 : aaaaaacdeeee
13 : aaaaaacdeeeee
14 : aaaaaacdeeeeee
15 : aaaaaacdeeeeeef
16 : aaaaaacdeeeeeeg
17 : aaaaaacdeeeeeeh
...
28 : aaaaaacdeeeeeey
29 : aaaaaacdeeeeef
30 : aaaaaacdeeeeefe
...
115246685191495242: euleoywuttttsss
115246685191495243: euler
115246685191495244: eulera
...
525069350231428029: ywuuttttssssrrr
定義P(w)為字串w的項次
定義W(p)為項次p的字串內容
可以看出P(w)和W(p)互為反函數,P(W(p)) = p以及W(P(w)) = w。
舉例:
W(10) = aaaaaacdee
P(aaaaaacdee) = 10
W(115246685191495243) = euler
P(euler) = 115246685191495243
請求出W(P(legionary) + P(calorimeters) - P(annihilate)
+ P(orchestrated) - P(fluttering))。
請用小寫字母表達答案(不加標點或空白)。
--
Tags:
拼圖
All Comments
By Emma
at 2014-09-19T04:30
at 2014-09-19T04:30
By Gilbert
at 2014-09-21T02:43
at 2014-09-21T02:43
By Tom
at 2014-09-22T14:49
at 2014-09-22T14:49
By Connor
at 2014-09-26T11:57
at 2014-09-26T11:57
By Ophelia
at 2014-09-29T11:22
at 2014-09-29T11:22
Related Posts
Puzzleup 2014 (7) Numbered Cards
By Edith
at 2014-09-10T21:54
at 2014-09-10T21:54
一個算是機率的問題
By Rosalind
at 2014-09-10T12:18
at 2014-09-10T12:18
ProjectEuler 479 Roots on the Rise
By Jake
at 2014-09-07T12:37
at 2014-09-07T12:37
三人持槍互射問題 變體
By Kumar
at 2014-09-05T17:41
at 2014-09-05T17:41
拼圖(紙質)市場全球產值
By Edward Lewis
at 2014-09-04T20:32
at 2014-09-04T20:32