Radioactive Blastervium
시간 제한1초메모리 제한2048 MB
1ms부터 Tms까지의 시각 중 주어진 N개의 서로 다른 소수 배수에 하나라도 해당하는 시각의 개수를 센다.
문제
It seemed like it would be a normal day at your chemistry lab, but reading the lab procedure, it looks like you'll be analyzing the behavior of a brand new element, discovered by a fellow Mines student!
This element, Blastervium, releases significant quantities of radioactive particles, which your fellow Mines scholars have deemed "burro particles". Your task is to find out just how many burro particles are released in a given amount of time.
While observing the Blastervium, you've realized that the element releases burro particles in prime number intervals of milliseconds. For example, if the Blastervium releases a burro particle every ms, then it will release a burro particle at ms, ms, ms, and so on after you begin recording.
The Blastervium can also have multiple overlapping intervals. But, if two intervals overlap, then only one burro particle will be released at the given timestep. For example, if there was a ms interval and a ms interval, only one burro particle would be released at the ms mark.
Given the length of each of the intervals, and assuming all intervals begin at , how many burro particles will be released over a given time period?
입력
The first line of input will contain two space-separated integers, and .
is the total number of burro particle intervals, with .
is the total time over which you are to determine how many burro particles are released, with . When measuring how many burro particles are released, the measuring period begins at ms, and ends at ms, inclusive of the endpoints.
The following lines of input are each a single integer representing the cycle length of a given burro particle interval, with each being a unique positive prime integer. The product of all cycle lengths will never exceed .
출력
Output a single line with a single integer representing the total number of burro particles released over the given time period.