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

33324번 - The Romanian Sieve 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB55221136.667%

문제

Ionuț Cercel (the son of Petrică Cercel) achieved everything there was to achieve in music after the absolute hit "Made in Romania".

Now he got an interest in competitive programming. In his preparation for the training camp in Phapos, he came across a concept called "The Romanian Sieve", which can be summarized by the following piece of code:

 int64_t iters = 0;
 for (int64_t i = 1; i ≤ n; i++) {
 for (int64_t j = i; j ≤ n; j += i) {
 max_div[j] = i;
 iters++;
 }
 }

As a curious individual, Ionuț asks himself: "Given an integer $t,ドル what is the largest value of $n$ such that iters $\leq t$ after running the Romanian Sieve algorithm?" Please help him answer this question.

입력

The first line contains an integer $t$ (1ドル \leq t \leq 3 \cdot 10^{13}$).

출력

Print one integer: the maximum $n$ such that iters $\leq t$ after running the algorithm.

제한

예제 입력 1

11

예제 출력 1

5

예제 입력 2

2846010382

예제 출력 2

149946143

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2024 > Day 7: Farewell Contest D번

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

출처

대학교 대회

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

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