diff options
Diffstat (limited to 'NearlyLuckyNumber')
| -rw-r--r-- | NearlyLuckyNumber/inp | 0 | ||||
| -rwxr-xr-x | NearlyLuckyNumber/main | bin | 25264 -> 0 bytes | |||
| -rw-r--r-- | NearlyLuckyNumber/main.cpp | 31 | ||||
| -rw-r--r-- | NearlyLuckyNumber/main_input0.txt | 1 | ||||
| -rw-r--r-- | NearlyLuckyNumber/main_input1.txt | 1 | ||||
| -rw-r--r-- | NearlyLuckyNumber/main_input2.txt | 1 | ||||
| -rw-r--r-- | NearlyLuckyNumber/main_output0.txt | 1 | ||||
| -rw-r--r-- | NearlyLuckyNumber/main_output1.txt | 1 | ||||
| -rw-r--r-- | NearlyLuckyNumber/main_output2.txt | 1 |
9 files changed, 0 insertions, 37 deletions
diff --git a/NearlyLuckyNumber/inp b/NearlyLuckyNumber/inp deleted file mode 100644 index e69de29..0000000 --- a/NearlyLuckyNumber/inp +++ /dev/null diff --git a/NearlyLuckyNumber/main b/NearlyLuckyNumber/main Binary files differdeleted file mode 100755 index 508d7ae..0000000 --- a/NearlyLuckyNumber/main +++ /dev/null diff --git a/NearlyLuckyNumber/main.cpp b/NearlyLuckyNumber/main.cpp deleted file mode 100644 index d807b1a..0000000 --- a/NearlyLuckyNumber/main.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -bool isLucky(string s) { - for(int i = 0; i < s.size(); i++) { - if(s[i] != '4' && s[i] != '7') { - return false; - } - } - return true; -} - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - long long n; - cin >> n; - string s = to_string(n); - int cnt = 0; - for(auto ch : s) { - if(ch == '4' || ch == '7') { - cnt ++; - } - } - if(isLucky(to_string(cnt))) { - cout << "YES"; - } else { - cout << "NO"; - } -} diff --git a/NearlyLuckyNumber/main_input0.txt b/NearlyLuckyNumber/main_input0.txt deleted file mode 100644 index 86b9da8..0000000 --- a/NearlyLuckyNumber/main_input0.txt +++ /dev/null @@ -1 +0,0 @@ -40047 diff --git a/NearlyLuckyNumber/main_input1.txt b/NearlyLuckyNumber/main_input1.txt deleted file mode 100644 index 92660b6..0000000 --- a/NearlyLuckyNumber/main_input1.txt +++ /dev/null @@ -1 +0,0 @@ -7747774 diff --git a/NearlyLuckyNumber/main_input2.txt b/NearlyLuckyNumber/main_input2.txt deleted file mode 100644 index c9a4149..0000000 --- a/NearlyLuckyNumber/main_input2.txt +++ /dev/null @@ -1 +0,0 @@ -1000000000000000000 diff --git a/NearlyLuckyNumber/main_output0.txt b/NearlyLuckyNumber/main_output0.txt deleted file mode 100644 index 5e35d1b..0000000 --- a/NearlyLuckyNumber/main_output0.txt +++ /dev/null @@ -1 +0,0 @@ -NO diff --git a/NearlyLuckyNumber/main_output1.txt b/NearlyLuckyNumber/main_output1.txt deleted file mode 100644 index f033a50..0000000 --- a/NearlyLuckyNumber/main_output1.txt +++ /dev/null @@ -1 +0,0 @@ -YES diff --git a/NearlyLuckyNumber/main_output2.txt b/NearlyLuckyNumber/main_output2.txt deleted file mode 100644 index 5e35d1b..0000000 --- a/NearlyLuckyNumber/main_output2.txt +++ /dev/null @@ -1 +0,0 @@ -NO |
