Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
523 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main()
{
    int day;
    int i;
    int aaa = 0;
    int gara = 0;
    int gg = 0;
    cin >> day;
    for (i = 0; i < day; i++)
    {
        int temp;
        cin >> temp;

        if (temp <= 0) {
            gara = 0;
            gg++;
        }

        if (temp > 0)
        {
            gara++;
            if (gara > aaa) aaa = gara;
        }


    }
    if (gg == i) cout << 0;
    else
        cout << aaa;

    //cout << aaa;
}