P1008 [NOIP 1998 Junior] Triple Hit

Background

本题为提交答案题,您可以写程序或手算在本机上算出答案后,直接提交答案文本,也可提交答案生成程序。

Description

Partition the $9$ numbers $1, 2, \ldots , 9$ into $3$ groups to form $3$ three-digit numbers, such that these $3$ three-digit numbers are in the ratio $1 : 2 : 3$. Find all triplets of three-digit numbers that satisfy this condition.

Input Format

None.

Output Format

Several lines, each containing 3 numbers. Sort the lines in ascending order by the first number in each line.

Explanation/Hint

NOIP 1998 Junior Problem 1. Translated by ChatGPT 5