回复:土耳其奥赛题:有理数函数(3星)

f(a/b) = (a + b) / 2 for co-prime positive integers a, b.


We can compute f(n) easily. f(n) = (1 + n) /2 for positive integer n.

f(1/n) = f(n) = (1 + n) / 2


For general co-prime positive integers a, b,

we can reduce to this simple case above with a procedure like Euclidean method calculating the GCD (a, b).



所有跟帖: 

我一开始以为是f(a/b)=a*b,后来才发现算错了 -康MM- 给 康MM 发送悄悄话 康MM 的博客首页 (0 bytes) () 04/14/2009 postreply 13:41:23

请您先登陆,再发跟帖!