挑战
我受到了盗窃的午夜船员的攻击,我需要召唤Catenative Doomsday Dice Cascader来保卫自己。由于我的空间不足,因此我需要代码尽可能短。
连环世界末日骰子级联的算法如下:
首先,将“ Prime Bubble”中的六面模具滚动,结果将确定下一步进行了多少次迭代。
从六面模具开始。对于“ Prime Bubble”骰子的滚动次数,将下一个骰子的边数乘以当前骰子滚动的结果。例如,如果在您的六面骰子的第一卷上您的骰子是2,那么您的下一个骰子将具有6 * 2 = 12面。
您的目标是编写一个不带任何输入并输出最后一次压模的最终结果的函数或程序。由于这是代码高尔夫球,因此每种语言中的最低字节数为准!
例子
示例1(直接从上面的链接获取):
The Prime Bubble rolls a 6, meaning that the Cascader will iterate six times
#1: We always start with a 6 sided die, and it rolls a 2, so the next die has 6x2=12 sides
#2: The 12 sided die rolls an 8, meaning that the third die has 12x8=96 sides
#3: The 96 sided die rolls a 35, meaning that die 4 has 96x35=3360 sides
#4: The 3360 sided die rolls a 2922, so die 5 has 3360x2922 = 9,817,920 sides
#5: The 9.8 million sided die rolls a 5,101,894, so the final die has 50,089,987,140,480 sides
#6: The 50 trillion sided die rolls a one. Hooray.
Since the last die rolled gave a 1, your function or program should output 1.
范例#2
The Prime Bubble rolls a 2, meaning that the Cascader will iterate twice.
#1: We always start with a 6 sided die, and it rolls a 4, so the next die has 6x4 = 24 sides
#2: The 24 sided die rolls a 14
Since the last die rolled gave a 14, your function or program should output 14.