Friday, February 1, 2019

Largest Number

  • Problem Description

    Python Program to Find the Largest Number in a List.

    Input : 
    First Line: Number Of Elements in the list

    Second Line: Elements of the List

    Output :
    Prints the largest element of the list 
  • CODING ARENA
  • n=int(input())
    a=input().split()
    a.sort()
    print(a[-1])

  • Test Case 1

    Input (stdin)
    3
    
    23 567 3
    
    
    Expected Output
    567
  • Test Case 2

    Input (stdin)
    4
    
    34 56 24 54
    
    
    Expected Output
    56

No comments:

Post a Comment