language: C++ (gcc-4.3.4)
date: 103 days 6 hours ago
link:
visibility: public
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
32
33
34
#include<iostream>
#include<cstdio>
#include<cctype>
#include<string>
using namespace std;
 
 
 
int main()
{
    long long int t,i,j;
    char ch;
    cin>>t;
    getchar();
    string str;
    str.resize(100001);
    
              
              while(t-- && cin>>str)
              {         
                        for(i=j=0;i<str.length();i++)
                        if(isdigit(str[i]) && !(str[i]=='4' || str[i]=='7'))j++;
                        
                       cout<<j;
                       cout<<endl;
                        str.resize(100001); 
               
              }
              
    
   
   return 0;
}