fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin>>n;
  7. int d;
  8. int k=0;
  9. while(n > 0) {
  10. d=n % 10;
  11. n/=10;
  12. if(d==7) k++;
  13. }
  14. if(k>0) cout<<"YES";
  15. else cout<<"NO";
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5320KB
stdin
17
stdout
YES