Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,n,x,s,z;
- bool flag=true;
- cin>>a;
- x=0;
- s=0;
- z=0;
- int niza[a];
- for(int i=0;i<a;i++)
- {
- cin>>n;
- niza[i]=n;
- }
- for(int i=0; i < a; i++)
- {
- flag=true;
- while(niza[i]>0)
- {
- x++;
- int cifra=niza[i]%10;
- niza[i]/=10;
- if(cifra%2==0)
- {
- flag=true;
- }else
- {
- flag=false;
- break;
- }
- }
- if(flag==true)
- {
- s++;
- z+=x;
- }
- x=0;
- }
- cout<<s<<endl;
- cout<<z<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement