Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int arr[n];
- int zbir=0;
- int zbir_na_tipki=0;
- for(int i=0;i<n;i++){
- cin>>arr[i];
- }
- for(int i=0;i<n;i++){
- if (arr[i]%2==0) {
- int golemina_na_brojot = 0;
- while(arr[i]%2==0){
- golemina_na_brojot += 1;
- if(arr[i]%2!=0){
- break;
- }
- arr[i] /= 10;
- if(arr[i]==0){
- zbir+=1;
- zbir_na_tipki += golemina_na_brojot;
- break;
- }
- }
- }
- }
- cout<<zbir<<endl;
- cout<<zbir_na_tipki<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment