← All problemsSign in

Divide Number

Given integer $N$, you need to find four integers $A,B,C,D$, such that they’re all factors of $N (A|N, B|N, C|N, D|N)$, and $N = A+B+C+D$. Your goal is to maximize $A$ X $B$ X $C$ X $D$. ###Input format First line contains an integer $T(1≤T≤4⋅10^4)$, represents the number of test cases. Each of the next $T$ lines contains an integer $N (1≤N≤4⋅10^4), N^4$ will not exceed 64 bit integer). ###Outpu

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start