Company: Deloitte_9nov
Difficulty: medium
Winning Ticket Number Problem Description Harry wants to sell lottery tickets and earn money out of it. In his basic research, he found that most lottery tickets follow some logic in deciding the winning ticket number. He studied many algorithms for the same and finally decided on this algorithm. Every day he provides N numbers as an input to the algorithm which is N and K, where N is the number of prime numbers to be used for the algorithm and K is a single-digit odd number. Algorithm WinningTicketNumber(N,K) Step 1: Create a list L of first N prime numbers that end with digit K and include 2 and 5 in that list. Step 2: Find the sum of all the numbers S of L. Step 3: Print the sum S as the winning ticket number for that day. Please write a program to implement WinningTicketNumber algorithm by accepting N and K values. Read the input from STDIN and write the output to STDOUT. You should not write arbitrary strings while reading the input and while printing as these contribute to the st