给定integer n
,输出e
大于1 的最小指数,n^e
其中包含n
作为子字符串。
例如,对于25
,答案应为2
,作为25 ^ 2 = 625
,包含25
为子字符串,但是对的答案13
应为10
,作为13 ^ 10 = 137858491849
,因此10
结果的最低指数为包含13
为子字符串。
规则
- 标准I / O规则
- 适用标准漏洞
- 以字节为单位的最短代码获胜
n
总是大于的整数0
测试用例
1 => 2 (1 ^ 2 = 1)
2 => 5 (2 ^ 5 = 32)
3 => 5 (3 ^ 5 = 243)
4 => 3 (4 ^ 3 = 64)
5 => 2 (5 ^ 2 = 25)
6 => 2 (6 ^ 2 = 36)
7 => 5 (7 ^ 5 = 16807)
8 => 5 (8 ^ 5 = 32768)
9 => 3 (9 ^ 3 = 729)
10 => 2 (10 ^ 2 = 100)
11 => 11 (11 ^ 11 = 285311670611)
12 => 14 (12 ^ 14 = 1283918464548864)
13 => 10 (13 ^ 10 = 137858491849)
14 => 8 (14 ^ 8 = 1475789056)
15 => 26 (15 ^ 26 = 3787675244106352329254150390625)
16 => 6 (16 ^ 6 = 16777216)
17 => 17 (17 ^ 17 = 827240261886336764177)
18 => 5 (18 ^ 5 = 1889568)
19 => 11 (19 ^ 11 = 116490258898219)
20 => 5 (20 ^ 5 = 3200000)
25 => 2 (25 ^ 2 = 625)
30 => 5 (30 ^ 5 = 24300000)
35 => 10 (35 ^ 10 = 2758547353515625)
40 => 3 (40 ^ 3 = 64000)
45 => 5 (45 ^ 5 = 184528125)
50 => 2 (50 ^ 2 = 2500)
55 => 11 (55 ^ 11 = 13931233916552734375)
60 => 2 (60 ^ 2 = 3600)
65 => 17 (65 ^ 17 = 6599743590836592050933837890625)
70 => 5 (70 ^ 5 = 1680700000)
75 => 3 (75 ^ 3 = 421875)
80 => 5 (80 ^ 5 = 3276800000)
85 => 22 (85 ^ 22 = 2800376120856162211833149645328521728515625)
90 => 3 (90 ^ 3 = 729000)
95 => 13 (95 ^ 13 = 51334208327950511474609375)
100 => 2 (100 ^ 2 = 10000)
Python脚本生成前1000个答案