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

judge showing wrong result in codeforce problem-439A

Revision en1, by ronny0813, 2020-07-30 18:42:10

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;//

Tags 439a

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ronny0813 2020-07-30 18:42:43 6 Tiny change: '#include<i' -> '\n\n\n#include<i'
en1 English ronny0813 2020-07-30 18:42:10 507 Initial revision (published)