Submission #2809

#TimeUsernameProblemLanguageResultExecution timeMemory
2809mh5664속이기 (GA5_fake)C++98
100 / 100
0 ms1092 KiB
#include <stdio.h> const int MAXN = 1000; int data[MAXN + 1]; int main () { int n; int sol = 0; scanf ("%d", &n); for (int i = 0; i < n; ++i) { scanf ("%d", &data[i]); sol += data[i]; } int sum = 0; for (int i = 0; i < n; ++i) { sum = (data[i] | sum) - (data[i] & sum); } if (sum != 0) { printf ("0"); } else { int min = 2147483647; for (int i = 0; i < n; ++i) { if (min > data[i]) min = data[i]; } printf ( "%d", sol - 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...