      cumSum += s[l]
        <span class="hljs-keyword">if</span> s[l] &lt; nMin:
          nMin = s[l]
        <span class="hljs-keyword">if</span> s[l] &gt; nMax:
          nMax = s[l]
        <span class="hljs-keyword">if</span> cumSum == n:
          <span class="hljs-keyword">break</span> findSum
        <span class="hljs-keyword">if</span> cumSum &gt; n:
          <span class="hljs-keyword">break</span>
  <span class="hljs-keyword">return</span> (n, nMin + nMax)

<span class="hljs-keyword">echo</span>