B. 砍竹子1 (bamboo)

    Type: Default 1000ms 256MiB

砍竹子1 (bamboo)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

蒙青创来四川川西竹海游玩,看着满眼的翠竹,tyk说我们来玩一个砍竹子的游戏吧,每根竹子长度n n ,砍为若干段,每段长度均为 正整数。请返回每段竹子长度的 最大乘积 是多少。

答案需要取模 1e9+7(1000000007),如计算初始结果为:1000000008,请返回 1。

输入格式

  • 一个数nn

输出格式

输出一行一个整数,代表答案。

样例 1

12
81

将竹子砍成3 * 3 * 3 * 3 的四段,可以看到就是最大值。

数据范围

1n100000001 \le n \le 10000000

0104

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2026-1-4 13:50
End at
2026-1-4 16:05
Duration
2.3 hour(s)
Host
Partic.
67