We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
why using :
size = int(input())
numbers = list(map(int, input().split()))
The input first line is N number of elements in the array, and second line is N space-separated integers that describe the array's elements. My understanding is that, if we use int(input()), size will be N+1 as the first line N is an integer in input.
\\
Please
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 0: Mean, Median, and Mode
You are viewing a single comment's thread. Return to all comments →
Please kindly explain:
why using : size = int(input())
numbers = list(map(int, input().split()))
The input first line is N number of elements in the array, and second line is N space-separated integers that describe the array's elements. My understanding is that, if we use int(input()), size will be N+1 as the first line N is an integer in input.
\\
Please