Number Theory Problem

Правка en1, от Raghu15_47, 2021-03-31 18:50:43

Need help with this number theory problem. Give me some hints, please.

Problem

Given an integer N <= 10^40 find the smallest m <= N such that m/phi(m) is maximum. Where phi is Euler's totient function.

Input:

The first line in the input gives the number of test cases T (T<=200), and then T lines follow each containing an integer N.

Output: Output the smallest required value of m.

Sample Input:

1 10

Output: 6

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Raghu15_47 2021-03-31 18:50:43 502 Initial revision (published)