10520 - Determine it

All about problems in Volume 105. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

lighted
Guru
Posts: 587
Joined: Wed Jun 11, 2014 9:56 pm
Location: Kyrgyzstan, Bishkek

Re: 10520 - Determine it

Post by lighted »

Yes it is possible to solve this problem also with a bottom-up approach. :D

Loops should be as follows

Code: Select all

for (i = n; i >= 1; i--)
{
    for (j = 1; j <= n; j++)
    {
        if (i >= j)
        {
            ..
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
Post Reply

Return to “Volume 105 (10500-10599)”