Skip to content

Commit 8e7c018

Browse files
authored
110A
1 parent e284d15 commit 8e7c018

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Nearly_Lucky_Number.cpp

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main()
4+
{
5+
long long n;
6+
cin >> n;
7+
int count=0;
8+
while (n!=0)
9+
{
10+
if (n% 10==4||n%10==7)
11+
{
12+
count += 1;
13+
}
14+
n/=10;
15+
}
16+
if(count==4||count==7)
17+
{
18+
cout << "YES" << endl;
19+
}
20+
else
21+
{
22+
cout <<"NO"<<endl;
23+
}
24+
return 0;
25+
}

0 commit comments

Comments
 (0)