Source Code
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int N;
    int min=0;

    scanf("%d", &N);

        for(int i=1;i<=N;i++){
        int a;
        scanf("%d",&a);

        if(min>a || i==1){
            min=a;
        }
        }


    if(min>=0){
        printf("0");
    }
    else{
    min=min*-1 +1;
    printf("%d",min);
    }



    return 0;
}
Copy
Zeina The Business Owner Qais Jildeh
GNU G++17
2 ms
468 KB
Wrong Answer