##背景##
IMO2006 CTSC TEST3
##描述##
一个有趣的圆环套圆环函数被定义如下:
G(n)=n-G(G(n-1)) (n是正整数)
G(0)=0
请你计算出圆环函数的值。
##输入格式##
一个非负整数n,n<=2^31-1。
##输出格式##
一个正整数,即G(n)。
##样例输入##
3
##样例输出##
2
##限制##
各个测试点1s
##提示##
典型数学竞赛题......
By signing up a OPS universal account, you can submit code and join discussions in all online judging services provided by us.