Multiply by 2, divide by 6
EasyRating 900CodeforcesMath & Implementation
Approach hintTry it first, then revealHide
Factor out all 2s and 3s from n; any other remaining factor makes the task impossible. Each division by 6 removes one 2 and one 3, so compare the two exponents.