Keep On Movin (贪心)

#include<bits/stdc++.h>
using namespace std; int main(){
int T, n, a;scanf("%d",&T);
while(T --){
scanf("%d",&n);
int odd = , even = ;
for(int i = ; i < n; i ++){
scanf("%d",&a);
odd += a % ;
even += a - (a & );
}
if(odd == ){
printf("%d\n",even);
continue;
}
even -= even % odd;
printf("%d\n",even/odd - ((even/odd) & ) + );
}
return ;
}
上一篇:vue 三目运算


下一篇:Djang之Model操作