P17670 [IO 2025 #4] Encrypted Farm
Description
Given $n$ and $k$. Find $k$ pairwise distinct solutions of the equation $a^n+b^n=c^{n+1}$ in positive integers, satisfying $1\le a,b,c\le 10^{18}$.
Input Format
The first line contains the number of test cases $t$, where $1\le t\le100$.
Each test case consists of two integers $n,k$, where $1\le n\le20$ and $1\le k\le5$.
Output Format
For each test case, output $k$ triples, each representing one solution of the equation.
Explanation/Hint
Translated by QwenWork