MathDB
n avenues south to north, n streets west to east, pay in every junction

Source: Norwegian Mathematical Olympiad 2011 - Abel Competition p4a

September 4, 2019
combinatoricsgridfunction

Problem Statement

In a town there are nn avenues running from south to north. They are numbered 11 through nn (from west to east). There are nn streets running from west to east – they are also numbered 11 through nn (from south to north). If you drive through the junction of the kkth avenue and the \ellth street, you have to pay kk\ell kroner. How much do you at least have to pay for driving from the junction of the 11st avenue and the 11st street to the junction of the nth avenue and the nnth street? (You also pay for the starting and finishing junctions.)