Rotate Three Variables
Python
Medium
3 views
Problem Description
Read three integers a b c. Rotate left once: a
Input Format
One line: a b c.
Output Format
One line: rotated values.
Official Solution
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}")
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!