Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

judge showing wrong result in codeforce problem-439A

Правка en2, от ronny0813, 2020-07-30 18:42:43

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

Теги 439a

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский ronny0813 2020-07-30 18:42:43 6 Tiny change: '#include<i' -> '\n\n\n#include<i'
en1 Английский ronny0813 2020-07-30 18:42:10 507 Initial revision (published)