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
    Nglinh_2k14   commented on April 11, 2025, 8:27 a.m.

    ai bt làm trên python ko chia sẻ cho mik với mn ik


  • 0
    truongphat   commented on Dec. 7, 2024, 8:38 p.m.

    có ai biết cách làm 20/20 ko? mình mới làm đc 14/20 thôi


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

    khó quá mn ơi


  • 4
    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


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

      chatgpt ko uy tín đâu


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

    This comment is hidden due to too much negative feedback. Show it anyway.


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

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


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

    oh no


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

    not good


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

    good