#P1008. Three-Digit Number Formation with Ratio \(1:2:3\) Using Digits 1 to 9
Three-Digit Number Formation with Ratio \(1:2:3\) Using Digits 1 to 9
Three-Digit Number Formation with Ratio (1:2:3) Using Digits 1 to 9
Divide the digits from 1 to 9 into three groups to form three three-digit numbers. These three numbers must be in the ratio \(1:2:3\). In other words, if the three numbers are \(a\), \(2a\), and \(3a\), all digits from 1 to 9 should appear exactly once among these numbers. Find and output all such valid sets of three-digit numbers.
inputFormat
No input is required for this problem.
outputFormat
Output the three three-digit numbers separated by a space. For example, the only valid set is: 192 384 576.
sample
192 384 576