Submission #2899

#TimeUsernameProblemLanguageResultExecution timeMemory
2899zyslee속이기 (GA5_fake)C++98
60 / 100
0 ms1092 KiB
#include<stdio.h> int data[1001], play[11]; 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<=n;i++){ if(play[i]==1){ printf("%d", 0); return 0; } } printf("%d", sum-min); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...