Logo
(追記) (追記ここまで)

34394번 - Radioactive Blastervium 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB169750.000%

문제

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 3ドル$ms, then it will release a burro particle at 3ドル$ms, 6ドル$ms, 9ドル$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 2ドル$ms interval and a 3ドル$ms interval, only one burro particle would be released at the 6ドル$ms mark.

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

입력

The first line of input will contain two space-separated integers, $N$ and $T$.

$N$ is the total number of burro particle intervals, with 1ドル \leq N \leq 10$.

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

The following $N$ lines of input are each a single integer $C$ representing the cycle length of a given burro particle interval, with each $C$ being a unique positive prime integer. The product of all cycle lengths will never exceed 10ドル^{15}$.

출력

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

제한

예제 입력 1

3 15
2
3
5

예제 출력 1

11

예제 입력 2

2 6
2
3

예제 출력 2

4

예제 입력 3

4 23
2
5
11
7

예제 출력 3

16

노트

출처

School > CS@Mines > CS@Mines HSPC 2022 > Advanced F번

  • 문제를 만든 사람: Joseph Claver
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /