13 Reasons Why

 Problem:-

Raghav is currently watching Netflix. He is feeling thrilled after watching Seasons 1, 2 and 3 of 13 Reasons Why, and is desperately waiting for release of Season 4. But the makers of the show are in no mood to release the next season anytime soon. 

The makers of 13 Reasons Why give Raghav a challenge to solve. If he solves this challenge, then they will give exclusive copy of Season 4 to him.

But Raghav is feeling lazy. Can you help him solve this challenge?

Given 3 integers A, B, C. Do the following steps-

  1. Swap A and B.
  2. Multiply A by C.
  3. Add C to B.
  4. Output new values of A and B.
SAMPLE INPUT
 
13 5 2
SAMPLE OUTPUT
 
10 15
Explanation

Steps-

  1. After swap, A = 5 and B = 13.
  2. A is multiplied by 2. So, A = 10.
  3. 2 is added to B. So, B = 15.
Time Limit:1.0 sec(s) for each input file.
Memory Limit:256 MB
Source Limit:1024 KB

Solution:-

a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
a,b=b,a
print(a*c,b+c)


Leave a Reply

Your email address will not be published.