#6201. [CERC2016] Easy Equation
[CERC2016] Easy Equation
[CERC2016] Easy Equation
题目描述
Given an integer $k$ greater than $1$, it is possible to prove that there are infinitely many triples of positive integers $(a, b, c)$ that satisfy the following equation:Given positive integers and , find arbitrary triples $(a_1, b_1, c_1), (a_2, b_2, c_2), \cdots , (a_n, b_n, c_n)$ that all satisfy the equation. Furthermore, all integers $(a_1, b_1, c_1), (a_2, b_2, c_2), \cdots , (a_n, b_n, c_n)$ should be different positive integers with at most decimal digits each.
输入格式
The first line contains two integers $k$ and $n\;(2 \leq k \leq 1000, 1 \leq n \leq 1000)$ — the constant k in the equation and the target number of triples.输出格式
Output $n$ lines. The $i$-th line should contain three space separated integers $a_i$, $b_i$ and $c_i$ with at most $100$ digits each — the $i$-th of the solutions you found.2 8
1 2 6
3 10 24
12 35 88
15 28 84
4 5 18
14 33 90
40 104 273
21 60 152
3 3
1 3 12
8 21 87
44 165 615