PLANTING
Planting, trees in a flash.
Both-ends, one-end, neither-end and circular types, with auto-calculated trees and intervals, plus random quizzes.
间隔数 = 20 ÷ 5 = 4
棵数 = 5 棵
一条 40 米的小路,每隔 5 米种一棵(两端都不种),一共要种几棵?
trees
Everything runs locally in your browser
Solution animation · intervals & trees
Split into intervals: 20 ÷ 5 = 4 intervals
What is this?
Intervals = length ÷ spacing. Both ends: trees = intervals + 1; one end: trees = intervals; neither end: trees = intervals − 1; circular: trees = intervals.
示例与注意事项Example & notes
一个例子A worked example
20 米小路每 4 米栽一棵:两端都栽要 6 棵(20÷4+1),只栽一端 5 棵,环形同样 5 棵。A 20 m path planted every 4 m: 6 trees when both ends are planted, 5 with one end, and 5 around a loop.
注意事项Things to watch
- 间隔数 = 总长 ÷ 间距;两端都栽要 +1,这是最常漏的一步。Intervals equal length divided by spacing; planting both ends needs one extra tree — the step people skip.
- 环形没有端点,棵数正好等于间隔数。A loop has no endpoints, so the tree count equals the interval count exactly.
- 锯木头、爬楼梯、敲钟都是同一个模型,可类比记忆。Sawing logs, climbing stairs and ringing bells are the same model — a useful analogy.
相关问答More Q&A
为什么两端都栽要多一棵?Why one more tree at both ends?
因为 n 个间隔对应 n+1 个端点,两个端点各有一棵。Because n intervals have n+1 endpoints, and each endpoint holds a tree.
有图示吗?Is there a diagram?
有,动画会逐段点亮间隔并给每棵树编号。Yes — an animation lights each interval and numbers every tree.