MA TRẬN

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 0.5s
Memory limit: 512M
Input: stdin
Output: stdout

Problem type
Allowed languages
C++, Pascal, Python

In case the statement didn't load correctly, you can download the statement here: Statement


Comments

Please read the guidelines before commenting.



  • 0
    PhuongLinh   commented on Sept. 21, 2024, 9:53 a.m.

    khó quá mn ơi


  • 2
    truongphat   commented on Aug. 16, 2024, 9:28 p.m.

    Định nghĩa hai ma trận A và B

    A = [[1, 1], [2, 2]] B = [[3, 2], [1, 4]]

    Tính tổng hai ma trận

    def add_matrices(A, B): result = [[0, 0], [0, 0]] for i in range(len(A)): for j in range(len(A[0])): result[i][j] = A[i][j] + B[i][j] return result

    Tính hiệu hai ma trận

    def subtract_matrices(A, B): result = [[0, 0], [0, 0]] for i in range(len(A)): for j in range(len(A[0])): result[i][j] = A[i][j] - B[i][j] return result

    Tính tích hai ma trận

    def multiply_matrices(A, B): result = [[0, 0], [0, 0]] for i in range(len(A)): for j in range(len(B[0])): for k in range(len(B)): result[i][j] += A[i][k] * B[k][j] return result

    In kết quả

    print("Tổng A + B:") print(addmatrices(A, B)) print("Hiệu A - B:") print(subtractmatrices(A, B)) print("Tích A x B:") print(multiply_matrices(A, B))

    chatGPT viết nè sai hết trơn luôn


    • 1
      KVMB23A_67   commented on Aug. 18, 2024, 4:44 p.m.

      chatgpt ko uy tín đâu


  • -3
    HDG_12   commented on June 16, 2024, 9:48 p.m.

    chatgpt


    • 4
      KVMB23A_67   commented on July 31, 2024, 10:03 a.m.

      dựa vào AI ko tốt đâu


  • 0
    nguyen13   commented on June 5, 2024, 5:25 p.m.

    oh no


  • 1
    test_a218   commented on May 17, 2024, 8:28 a.m.

    not good


  • -3
    phanquanganh   commented on April 17, 2024, 8:20 p.m.

    good