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 res = 0;
- for(int i = 1;i <= n; i++){
- int x;
- cin >> x;
- int ok = 0;
- for(int j = x;j > 0;j /= 10){
- int cifra = j%10;
- if (cifra == 1 or cifra == 4 or cifra == 7){
- ok += 1;
- }
- }
- if(ok == 4) {
- res++;
- }
- }
- cout << res << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment