DEV Community

Discussion on: Day 55 Of 100DaysCode : More About Algorithm

Collapse
 
otumianempire profile image
Michael Otu
input_n = int(input())
input_numbers = [int(x) for x in input().split()]
Enter fullscreen mode Exit fullscreen mode
  • input_n was not used.
  • [int(x) for x in input().split()] is the same as list(map(int, input().split()))

To make use of input_n you would have to modify def max_pairwise_product(numbers): to add another parameter, say n as def max_pairwise_product(numbers, n): so that in the function body you'd remove n = len(numbers).

So you would add another parameter, n and remove the line, n = len(numbers)

Collapse
 
iamdurga profile image
Durga Pokharel

Yes. Thank you for the suggestion.