题面&样例
查看原帖
题面&样例
1192611
Jason514楼主2024/10/22 11:39

题面翻译

读入 nn (1n1000)(1\le n\le 1000),问最少几次乘除法可以从 xx 得到 xnx^n,例如 x31x^{31} 需要6次:x2x^{2} == xxx\cdot xx4x^{4} == x2x^{2}\cdot x2,x^{2}, ,\dots , x32x^{32} == x16x16,x^{16}\cdot x^{16}, x31x^{31} == x32÷xx^{32}÷x

输入输出样例

input 1:

1

output 1:

0

input 2:

91

output 2:

9

input 3:

811

output 3:

13

2024/10/22 11:39
加载中...