아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Common Factors

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

요약
2 ≤ k ≤ n인 k 중에서 [1, k]의 정수 가운데 k와 1보다 큰 공약수를 가지는 비율이 가장 큰 k를 찾아 기약분수로 출력한다.
난이도

보통10점 중 7점

유형
정수론, 수학
정답자
아직 제출이 없습니다

문제

Everyone likes to share things in common with other people.

Numbers are the same way! Numbers like it when they have a factor in common.

For example, 44 and 66 share a common factor of 22, which gives them something to talk about.

For a given integer nn, we define a function, f(n)f(n), equal to the number of integers in the range [11, nn] that share a common factor greater than 11 with nn.

Furthermore, we can define a second function, g(n)g(n), which characterizes the fraction of numbers that like a given number as follows: g(n)=f(n)ng(n) = \frac{f(n)}{n}.

What we really want to know though, is, for any integer 2≤k≤n2 ≤ k ≤ n, what is the maximum value of g(k)g(k)?

입력

The input consists of a single integer nn (2≤n≤10182 ≤ n ≤ 10^{18}), the value of nn for the input case.

출력

For the provided test case, output the result as a fraction, in lowest terms, in the form pp/qq where the greatest common divisor of pp and qq is 1.

예제2

  1. 예제 1

    입력
    10
    
    예상 출력
    2/3
    
  2. 예제 2

    입력
    100
    
    예상 출력
    11/15