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

22302번 - Factorial Factors 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB104564953.846%

문제

The factorial of a number N, written N!, is the product of all integers between 1 and N, inclusively. For example, 5! = 120.

Every integer greater than 1 can be written as the product of 1 or more prime numbers, some of which may repeat. For example, 120 = 2 * 2 * 2 * 3 * 5.

For this problem, we are interested in the prime factorization of the factorial of a number. You will need to determine the number of total and distinct prime factors. For the example above, there are 5 total prime factors (2, 2, 2, 3, 5) and 3 distinct prime factors (2, 3, 5).

입력

The first line of input will contain the number of test cases, C (1 ≤ C ≤ 50). Each test case will consist of a single line containing an integer N (2 ≤ N ≤ 100,000).

출력

Each test case will result in a single line of output D T where D is the number of distinct prime factors of N! and T is the total number of prime factors of N!.

제한

예제 입력 1

2
5
6

예제 출력 1

3 5
3 7

힌트

출처

ICPC > Regionals > North America > South Central USA Regional > 2014 South Central USA Regional Programming Contest 6번

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

출처

대학교 대회

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

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