3. Reference Alias Update

Given two signed 32-bit integers a and b, create a C++ reference that aliases a.
Update the value of a by adding b only through this reference.

Do not modify a directly after the reference is created.

Print the updated value of a.

Example 

Input:

5 3

Output:

8

 

Constraints:

  • a and b are signed 32-bit integers (int32_t)
  • Modification of a must occur only through a C++ reference
  • Do not use pointers
  • Assume no integer overflow occurs

 

 

 

 

Loading...

Input

5 3

Expected Output

8