Source Code
#include <bits/stdc++.h>

using namespace std;

int main(){
    long long n,m,sum =0;
    cin>>n>>m;
    int arr[n];
    for(int i = 0;i<n;i++){
        cin>>arr[i];
        sum+=arr[i];
    }
    if(sum%n==0){
        cout<<(m/(n*n))+1<<"\n";
    }else cout<<0<<"\n";
}
Copy
Spin the wheel Ahmed57
GNU G++17
1 ms
244 KB
Wrong Answer