Please read the new rule regarding the restriction on the use of AI tools. ×

ronny0813's blog

By ronny0813, history, 4 years ago, In English

include

using namespace std; int main() { long int i,n,d,x,sum=0; cin>>n>>d; int arr[n]; for(i=0;i<n;i++) cin>>arr[i]; for(i=0;i<n;i++) sum+=arr[i]; x=d/n; if(x<10) {cout<<"-1"; } else { cout<<(d-sum)/5; } }

//test 21 showing my result as -1 in online judging, but when i compile it in my own ide it shows the correct result as 104;//

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it