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

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #82: Path sum: three ways

Project Euler #82: Path sum: three ways

Contest ends in
Problem
Submissions
Leaderboard
Discussions

This problem is a programming version of Problem 82 from projecteuler.net

The minimal path sum in the matrix below, by starting in any cell in the left column and finishing in any cell in the right column, and only moving up, down, and right, is indicated in bold the sum is equal to .

Find the minimum path sum in given matrix.

Input Format

Each testcase begins with an integer followed by N lines containing the description of the matrix.

Constraints


Output Format

A single line for each testcase containing the value of the minimal path sum.

Sample Input

5
131 673 234 103 18
201 96 342 965 150
630 803 746 422 111
537 699 497 121 956
805 732 524 37 331

Sample Output

994

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

2125

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy