HackerRank 문제: https://www.hackerrank.com/challenges/np-array-mathematics/problem
import numpy
N,M=map(int,input().split())
A=numpy.array([list(map(int,input().split())) for n in range(N)])
B=numpy.array([list(map(int,input().split())) for n in range(N)])
print(numpy.add(A,B))
print(numpy.subtract(A,B))
print(numpy.multiply(A,B))
print(numpy.floor_divide(A, B))
print(numpy.mod(A,B))
print(numpy.power(A,B))
'Computer Science > [20-4] Numpy 연습' 카테고리의 다른 글
[Numpy] (5) Eye and Identity (0) | 2020.04.02 |
---|---|
[Numpy] (4) Zeros and Ones (0) | 2020.04.01 |
[Numpy] (3) Concatenate로 여러개의 배열 합치기 (0) | 2020.03.31 |
[Numpy] (2) Transpose and Flatten, flatten()과 ravel()의 차이점 (0) | 2020.03.30 |
[Numpy] (1) Numpy arrays basic (0) | 2020.03.29 |
댓글