Problem5613--极值问题

5613: 极值问题

Time Limit: 1.000 Sec  Memory Limit: 128 MB
Submit: 28  Solved: 12
[Submit] [Status] [Web Board] [Creator:]

Description

已知m、n为整数,且满足下列两个条件: 
(1)m、n∈1,2,3,……,k 
(2)(n^2-mn-m^2)^2=1 
对给定的k,求m^2+n^2的最大值 

Sample Input

1995

Sample Output

m=987
n=1597

Source/Category


[Submit] [Status]