Input Format
A single line of input containing the space separated elements of array .
Output Format
On the first line, print the  of A.
On the second line, print the  of A.
On the third line, print the  of A.

hackerrank floor ceil and rint problem solution in python programming

Problem solution in Python 3 programming language.

import numpy
my_array = numpy.array(map(float, input().split()))
print(numpy.floor(my_array))
print(numpy.ceil(my_array))
print(numpy.rint(my_array))

Second solution

import numpy
numpy.set_printoptions(sign=' ')
a = numpy.array(input().split(),float)
print(numpy.floor(a))
print(numpy.ceil(a))
print(numpy.rint(a))

Problem solution in Python 2 programming language.

import numpy
my_array = numpy.array(map(float, raw_input().split()))
print numpy.floor(my_array)
print numpy.ceil(my_array)
print numpy.rint(my_array)