Rotate Three Variables

Rotate Three Variables

Medium Python Variables 20 views
Explanation Complexity

Problem Statement

Read three integers a b c. Rotate left once: a

Input Format

One line: a b c.

Output Format

One line: rotated values.

Example

1 2 3
2 3 1

Constraints

-10^9

Input / Output Format

Input Format
One line: a b c.
Output Format
One line: rotated values.
Constraints
-10^9

Examples

Input:
1 2 3
Output:
2 3 1

Example Solution (Public)

Python
import sys
p=sys.stdin.read().strip().split()
if not p: sys.exit(0)
a=int(p[0]); b=int(p[1]); c=int(p[2])
a,b,c=b,c,a
sys.stdout.write(f"{a} {b} {c}")

Official Solution Code

import sys
p=sys.stdin.read().strip().split()
if not p: sys.exit(0)
a=int(p[0]); b=int(p[1]); c=int(p[2])
a,b,c=b,c,a
sys.stdout.write(f"{a} {b} {c}")
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.