diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-09-07 12:01:16 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-09-07 12:01:16 +0900 |
| commit | c14731c45f0a263936bf2ca4a09940cfd4c670b5 (patch) | |
| tree | a57c707d31b41df03b0b82e9ff1fa4532f1c5aad /problems/14-Matrix-Square/testcase_2_float_8x8.rb | |
| parent | 4db9b0d4d646dc903c2c4a94b27112866484c623 (diff) | |
| download | mncore-challenge-c14731c45f0a263936bf2ca4a09940cfd4c670b5.tar.gz mncore-challenge-c14731c45f0a263936bf2ca4a09940cfd4c670b5.tar.zst mncore-challenge-c14731c45f0a263936bf2ca4a09940cfd4c670b5.zip | |
14-Matrix-Square: testcase 2 - float 8x8
Diffstat (limited to 'problems/14-Matrix-Square/testcase_2_float_8x8.rb')
| -rw-r--r-- | problems/14-Matrix-Square/testcase_2_float_8x8.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/problems/14-Matrix-Square/testcase_2_float_8x8.rb b/problems/14-Matrix-Square/testcase_2_float_8x8.rb new file mode 100644 index 0000000..b252979 --- /dev/null +++ b/problems/14-Matrix-Square/testcase_2_float_8x8.rb @@ -0,0 +1,14 @@ +require 'matrix' + +a = Matrix[ + [3.0, 9.0, 7.0, 5.0, 1.0, 1.0, 0.0, 8.0], + [6.0, 7.0, 0.0, 9.0, 8.0, 2.0, 1.0, 1.0], + [3.0, 5.0, 4.0, 2.0, 6.0, 1.0, 2.0, 3.0], + [4.0, 7.0, 1.0, 5.0, 5.0, 0.0, 6.0, 1.0], + [0.0, 9.0, 9.0, 8.0, 3.0, 0.0, 6.0, 4.0], + [1.0, 4.0, 0.0, 9.0, 2.0, 6.0, 3.0, 5.0], + [5.0, 1.0, 9.0, 7.0, 9.0, 8.0, 5.0, 9.0], + [0.0, 1.0, 0.0, 3.0, 3.0, 2.0, 8.0, 3.0], +] + +puts a**2 |
