Contest Performance

  • + 0 comments

    Try this int main(){ int arr[100]; for(int j=1;j<6;j++) {cin>>arr[j];} int count=0; for(int i=1;i<6;i++)
    {if(arr[i]==i) { count+=100 ;

        }
    else if(arr[i]!=i&&arr[i]<=10+i)
        {
          count+=100-(arr[i]-i)*10;    
        }
    }
    cout<<count;
    return 0;
    

    }