Radioactive Blastervium

시간 제한1초메모리 제한2048 MB

요약
1ms부터 Tms까지의 시각 중 주어진 N개의 서로 다른 소수 배수에 하나라도 해당하는 시각의 개수를 센다.
난이도

어려움10점 중 8점

유형
수학, 정수론, 조합론, 비트 연산
정답자
아직 제출이 없습니다

문제

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 33ms, then it will release a burro particle at 33ms, 66ms, 99ms, 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 22ms interval and a 33ms interval, only one burro particle would be released at the 66ms mark.

Given the length of each of the intervals, and assuming all intervals begin at T=0T=0, how many burro particles will be released over a given time period?

입력

The first line of input will contain two space-separated integers, NN and TT.

NN is the total number of burro particle intervals, with 1≤N≤101 \leq N \leq 10.

TT is the total time over which you are to determine how many burro particles are released, with 1≤T≤10151 \leq T \leq 10^{15}. When measuring how many burro particles are released, the measuring period begins at 11ms, and ends at TTms, inclusive of the endpoints.

The following NN lines of input are each a single integer CC representing the cycle length of a given burro particle interval, with each CC being a unique positive prime integer. The product of all cycle lengths will never exceed 101510^{15}.

출력

Output a single line with a single integer representing the total number of burro particles released over the given time period.

예제3

  1. 예제 1

    입력
    3 15
    2
    3
    5
    
    예상 출력
    11
    
  2. 예제 2

    입력
    2 6
    2
    3
    
    예상 출력
    4
    
  3. 예제 3

    입력
    4 23
    2
    5
    11
    7
    
    예상 출력
    16