#PCBNAM0000018. Bản ghi phân cách hỗn hợp (Mixed-Delimiter Record)
Bản ghi phân cách hỗn hợp (Mixed-Delimiter Record)
Mixed-Delimiter Record
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
A record has three lines. The first contains a code and count separated by :. The second contains three real values separated by commas. The third is a verbatim note and may be empty. Normalize the output to space-separated fields while preserving the note content.
Input
Line 1 has the form code:count. Line 2 has the form x,y,z. Line 3 is a note string , which may be empty.
Output
Line 1 prints the code and count. Line 2 prints the three float values , , separated by single spaces. Line 3 prints the note verbatim (a blank line if it is empty).
Subtasks
- Subtask 1 — 100 points: ; the code has 1–20 characters without
:or whitespace; the note has at most 100 characters. In this training version, the three values are finite, have at most three decimal digits, satisfy , and any nonzero absolute value is at least .
Examples
Input
A007:3
1.5,2,3.25
Du lieu A
Output
A007 3
1.5 2.0 3.25
Du lieu A
Explanation
Splitting the first line at : gives A007 and 3, with count . Splitting the second line at commas gives 1.5, 2, 3.25, converted to floats , , and . The third line is read verbatim as Du lieu A. The output contains exactly these three lines.