Make a Stable ID

Make a Stable ID

Medium Python Variables 18 views
Explanation Complexity

Problem Statement

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.

Example

12 45
12-000045

Constraints

0

Input / Output Format

Input Format
One line: userId orderId.
Output Format
One id string.
Constraints
0

Examples

Input:
12 45
Output:
12-000045

Example Solution (Public)

Python
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}")

Official Solution Code

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}")
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.