Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string a;
- int w;
- int main()
- {
- cin >> a;
- if(a.size() == 1){ cout << "NO"; return 0;}
- for(int i = 0; i < a.size(); i++) if(a[i] == '7' || a[i] == '4') w+=1;
- if(w == 0) { cout << "NO"; return 0;}
- if(w == 4 || w == 7) { cout << "YES"; return 0;}
- cout << "NO";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement