Advertisement
rengetsu

Codeforces_110A

Jul 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. //Codeforces Round 110A
  2. #include <string>
  3. #include <cstring>
  4. #include <iostream>
  5. using namespace std;
  6. int main()
  7. {
  8.     int len, answ=0;
  9.     string s;
  10.     char mass[101];
  11.     cin >> s;
  12.     len = s.size();
  13.     strcpy(mass, s.c_str());
  14.     for(int i=0;i<len;i++)
  15.     {
  16.         if(mass[i]=='4' || mass[i]=='7'){answ++;}
  17.     }
  18.     if(answ==4 || answ==7 || answ==47 || answ==74){cout<<"YES";}
  19.     else{cout<<"NO";}
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement