/*Kacper Kielak*/
#include <cstdio>
int main()
{
int notes;
scanf("%d", ¬es);
int min = 1001;
int sum = 0;
int tempNote;
for(int i=0; i<notes; i++)
{
scanf("%d", &tempNote);
sum += tempNote;
if(tempNote < min && tempNote%2 != 0)
min = tempNote;
}
if(sum%2 == 0)
printf("%d", sum);
else
{
if(notes == 1)
printf("NIESTETY");
else
printf("%d", (sum-min));
}
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /*Kacper Kielak*/ #include <cstdio> int main() { int notes; scanf("%d", ¬es); int min = 1001; int sum = 0; int tempNote; for(int i=0; i<notes; i++) { scanf("%d", &tempNote); sum += tempNote; if(tempNote < min && tempNote%2 != 0) min = tempNote; } if(sum%2 == 0) printf("%d", sum); else { if(notes == 1) printf("NIESTETY"); else printf("%d", (sum-min)); } return 0; } |
English