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.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Warmup
  4. Mini-Max Sum
  5. Discussions

Mini-Max Sum

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • olivierliu
    6 years ago+ 64 comments

    This is my code in Python. Should be easy to understand even for beginners.

    lst = map(int,raw_input().strip().split(' '))
    x = sum(lst)
    print (x-(max(lst))), (x-(min(lst)))
    
    269|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature