Make a Stable ID
Python
Medium
2 views
Problem Description
Read two integers userId and orderId, build an id string as userId-orderId with zero padding of orderId to 6 digits. Output the string.
Input Format
One line: userId orderId.
Output Format
One id string.
Official Solution
import sys
p=sys.stdin.read().strip().split()
if not p: sys.exit(0)
uid=int(p[0]); oid=int(p[1])
sys.stdout.write(f"{uid}-{oid:06d}")
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!