Skip to content
Onsite

Easy Wood Cutter

EasyP3Coding

A piece of wood of the given length can be cut into pieces of length 3 with nothing left over only when the length is divisible by 3. Return true if it is, otherwise false.

Example 1

Input
length = 9
Output
true

Example 2

Input
length = 10
Output
false

Example 3

Input
length = 3
Output
true

Constraints

  • 1 <= length <= 10^9

Hints

Run checks the 3 visible tests, Submit all 8.