10 行あり、各行には 1 ~ 100 の値を持つ 1 ~ 10 の数値を含めることができます (実際の値は重要ではありません)。例として、最初の 3 行は次のようになります。
1. (2 numbers) 1st 2nd 1st 2nd
2. (1 number) all combinations ---> 1st 1st 1st 1st
3. (2 numbers) 1st 1st 2nd 2nd
実数の場合:
1. 5, 7 5 7 5 7
2. 2 all combinations ---> 2 2 2 2
3. 12, 24 12 12 24 24
This results in a total of 4 unique combinations.
これはどのように解決できますか?for ループと if ステートメントを試してみましたが、期待どおりに動作しません。