A New Restaurant
CodeChefOpen on judge ↗
Chef opens a new restaurant in the city of Byteland which can be represented in x-y plane. Chef’s restaurant is at point R(0,0). All the (x,y) points in Byteland where x and y both are integers represent a building. One fine day, Chef wants to know the number of buildings which are exactly D unit away from chef restaurant. Input - First line contains a number T, number of test cases. Each of t
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.
Sign in to chat with the tutor and save your progress.
Sign in to start