제출 #2852

#제출 시각아이디문제언어결과실행 시간메모리
28526590f1속이기 (GA5_fake)C++98
100 / 100
0 ms1092 KiB
#include <stdio.h> int d[1001]; int main () { int n,i,k=0,ind,min=9999999; long long int sum=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&d[i]); sum=sum+d[i]; if(min>d[i]){ min=d[i]; ind=i; } } sum=sum-min; for(i=1;i<=n;i++){ if(ind==i)continue; else if(k==0){ k=d[i]; continue; } k=k^d[i]; } if(min==k)printf("%lld",sum); else printf("0"); 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...