Zeros and Ones
-
Practice>Python>Numpy>Zeros and Oneshackerrank.com 2019. 3. 9. 05:46
hackerrank.comZeros and OnesProblem link : https://www.hackerrank.com/challenges/np-zeros-and-ones/problemDifficulty : EasyTipDimension is not 3, it is NThe maximum length of dimension is 3dims = tuple(map(int, input().split()))This is a key :)Solution import numpy dims = tuple(map(int, input().split())) a = numpy.zeros(dims, dtype = numpy.int) print(a) b = numpy.ones(dims, dtype = numpy.int) pr..