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

11790번 - Primorial vs LCM 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB4321168526.074%

문제

Given N (2<=N<=1014), what is the quotient of LCM(1,2,3,....,N) divided by multiple of all primes up to N. As the result might be too big, output it's modulo by 1000000007.

For example, when N=5, the result is LCM(1,2,3,4,5)/(2*3*5)=60/30=2.

Note that LCM stands for Lowest or Least Common Multiple.

입력

The first line of the input is T(T ≤ 50000), then T test cases follows in next T lines. Each line contains an integer N (2 ≤ N ≤ 100000000000000 or 1014). The meaning of N is given in the problem statement.

출력

For each test case print a line in “Case x: S” format where x is case number and S is the quotient modulo by 1000000007.

제한

예제 입력 1

10
2
3
4
5
6
7
8
9
10
1000

예제 출력 1

Case 1: 1
Case 2: 1
Case 3: 2
Case 4: 2
Case 5: 2
Case 6: 2
Case 7: 4
Case 8: 12
Case 9: 12
Case 10: 744593350

힌트

출처

ICPC > Regionals > Asia Pacific > Thailand > 2015 ACM-ICPC Asia Phuket Regional Programming Contest G번

  • 문제의 오타를 찾은 사람: h0ngjun7
(追記) (追記ここまで)

출처

대학교 대회

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

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