Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 110А
- long int n, k = 0, f = 1;
- cin >> n;
- while(n!=0){
- if(n%10==7 || n%10==4){k++;}
- n /= 10;
- }
- while(k!=0){
- if(k%10 != 4 && k%10 != 7){f = 0;}
- k /= 10;
- }
- if(f==1){cout << "YES";}
- else{cout << "NO";}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement