下面这段代码的作者是Johns Hopkins University的
Raymond Cheong:
#include <stdio.h>
int l;int main(int o,char **O,
int I){char c,*D=O[1];if(o>0){
for(l=0;D[l ];D[l
++]-=10){D [l++]-=120;D[l]-=
110;while (!main(0,O,l))D[l]
+= 20; putchar((D[l]+1032)
/20 ) ;}putchar(10);}else{
c=o+ (D[I]+82)%10-(I>l/2)*
(D[I-l+I]+72)/10-9;D[I]+=I<0?0
:!(o=main(c/10,O,I-1))*((c+999
)%10-(D[I]+92)%10);}return o;}
你可以在GCC中编译,链接这段代码生成可执行文件cheong。然后在命令行中键入:
./cheong 12345678
你看能得到什么?3513。right,程序的功能就是计算一个偶数位整数n的[sqrt(n)](奇数位整数在最高位前加0)