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

24403번 - Common Factors 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB172857551.020%

문제

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, 4ドル$ and 6ドル$ share a common factor of 2ドル,ドル which gives them something to talk about.

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

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

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

입력

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

출력

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

제한

예제 입력 1

10

예제 출력 1

2/3

예제 입력 2

100

예제 출력 2

11/15

힌트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2021 C번

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

출처

대학교 대회

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

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