← All problemsSign in

Divide Equally

Given 3 integers A, B, and C, and an integer N, the task is to distribute N among all the other 3 numbers such that at the end A = B = C. If the distribution is possible then print “Yes” otherwise output “No”. Constraints: 1 ≤ A,B,C ≤ 100 1 ≤ N ≤ 100 Input: First line is the number of test cases followed by the second line which represents A, B, C and N respectively. Output: Print “Yes”

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