#PCBSAU0000027. Căn lề và độ rộng trường (Field Width and Alignment)
Căn lề và độ rộng trường (Field Width and Alignment)
Field Width and Alignment
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a real , print it to two decimal places inside a field of width 16, left-, right-, then center-aligned. Use | to mark field boundaries.
Input
One line containing real .
Output
Three lines, each |<16-character field>|, for left, right and center alignment. Spaces are significant.
Subtask
- Subtask 1 — 100 points: ; is a multiple of .
Example
Input
12.5
Output
|12.50 |
| 12.50|
| 12.50 |
Explanation
12.50 has length 5, leaving 11 spaces. Left alignment puts all 11 after it, right alignment before it, and center alignment puts 5 before and 6 after.