diff --git a/User/Java/LuckyNumber b/User/Java/LuckyNumber new file mode 100644 index 00000000..651f1f2d --- /dev/null +++ b/User/Java/LuckyNumber @@ -0,0 +1,25 @@ +import java.util.Scanner; + +public class LuckyNumber { + + public static void main(String args[]) { + Scanner input = new Scanner(System.in); + int n = input.nextInt(); + int k = input.nextInt(); + int count = 0; + while (n > 0) { + int lucky = 0; + char result[] = input.next().toCharArray(); + for (int i = 0; i < result.length; ++i) { + if (result[i] == '4' || result[i] == '7') { + lucky += 1; + } + } + if (lucky <= k) { + count += 1; + } + n--; + } + System.out.println(count); + } +} \ No newline at end of file diff --git a/User/Java/tanvir.json b/User/Java/tanvir.json new file mode 100644 index 00000000..8e8faf02 --- /dev/null +++ b/User/Java/tanvir.json @@ -0,0 +1,7 @@ +{ + "Name": "Tanvir Rahman", + "Occupation": "Student", + "UserName": "tanviranindo", + "StarredTheRepo": true, + "FavouriteQuote": "Try harder" +}