#PCBTAM0000025. Hai cột văn bản (Two Text Columns)
Hai cột văn bản (Two Text Columns)
Two Text Columns
Version: Phuoc Hung OJ Extended
Problem Statement
Given two ASCII text strings and , display them in two adjacent columns, each with a minimum width of characters:
- Left-align the first column: add spaces after if it has fewer than characters.
- Right-align the second column: add spaces before if it has fewer than characters.
Put | before, between, and after the columns. Do not truncate strings longer than characters.
Input
The first line contains ; the second contains . Both may be empty or have existing spaces.
Output
Print one line in the format |left_column|right_column|, preserving every | and space exactly.
Subtasks
- Subtask 1 (100 points): ; all characters are printable ASCII.
Examples
Example 1
Input
A
B
Output
|A | B|
Explanation. Pad A with nine spaces on its right and B with nine on its left.
Example 2
Input
12345678901
X
Output
|12345678901| X|
Explanation. The first string has characters, so it is preserved despite minimum width .
Example 3
Input
Output
| | |
Explanation. Both strings are empty, so each field consists of exactly ten spaces inside the three | characters.