#include <iostream> using namespace std; int tab[1000001]; int main(){ int i,s=0; cin>>i; for(int b=0;b<i;b++) {cin>>tab[b]; s=s+tab[b];} if(s%2==0) cout<<s; else cout<<"NIESTETY"; return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <iostream> using namespace std; int tab[1000001]; int main(){ int i,s=0; cin>>i; for(int b=0;b<i;b++) {cin>>tab[b]; s=s+tab[b];} if(s%2==0) cout<<s; else cout<<"NIESTETY"; return 0; } |