#P31. [KBC001G] ABC
[KBC001G] ABC
Source
This problem is adapted from Long Long OJ. All rights reserved.
Description
Given an integer , find all valid pairs consisting of three integers that satisfy the following conditions:
Input
An integer .
Output
Output all values of that satisfy the conditions, sorted in lexicographical order from smallest to largest. Separate each number with a space.
Samples
5
3 4 5
20
3 4 5
5 12 13
6 8 10
8 15 17
9 12 15
12 16 20
Tips
For of the testcases, .