NDIVPHI  N DIV PHI_N
Given an integer N <= 10^{40} find the smallest m <= N such that m/phi(m) is maximum.
Input
N_{1}
N_{2}
.
.
.
N_{20}
Output
m_{1}
m_{2}
.
.
.
m_{20}
Example
Input: 10 . .
Output: 6 . .
hide comments
bashrc is back:
20110630 16:03:13
haskell friendly problem


Gurpreet Singh:
20110122 10:25:44
Finally done!!!!


sudipto das:
20101009 22:31:25
Range is small enough...........


Frank Rafael Arteaga:
20100424 12:47:29
Ravi, the data test is right. In your code:


Ravi Kiran:
20100423 14:06:35
@Frank


thomas anderson:
20100422 20:47:56
is there more than one m where m/phi(m) is maximum and m<=N? 

Zhenlei Jia:
20100422 13:40:48
Euler's totient function, see http://en.wikipedia.org/wiki/Euler%27s_totient_function 

Mohamed Ramzy:
20100422 12:55:59
what is phi(m)?? 
Added by:  Frank Rafael Arteaga 
Date:  20100422 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS OBJC PERL6 SQLITE VB.NET 
Resource:  ProjectEuler 