This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
int data[1001], play[101];
int main()
{
int n, i, k, kk, sum=0, min=0;
scanf("%d", &n);
for(i=1;i<=n;i++){
scanf("%d", &data[i]);
sum+=data[i];
if(min==0 || min>data[i]) min = data[i];
k = 0;
kk = data[i];
while(kk>0){
play[++k] = (play[k]+(kk%2))%2;
kk/=2;
}
}
for(i=1;i<=100;i++){
if(play[i]==1){
printf("%d", 0);
return 0;
}
}
printf("%d", sum-min);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |