免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 2698 | 回复: 15
打印 上一主题 下一主题

谁能解释一下下面这段bt程序? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-07 14:19 |只看该作者 |倒序浏览
//////////////////////////////////////////////////////////////////////
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# \
}'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
:0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

源程序设为 *.c
我是用visual c++ 6.0编译的
运行结果不可思意

论坛徽章:
0
2 [报告]
发表于 2006-06-07 14:44 |只看该作者
main(t,_,a)char *a;
这个函数是程序的入口.参数没有声明的是int,包括t,_,返回值没有声明也是int.
当然这个函数除了入口极相关功能没有其他特别的,所以可以被别的函数调用. 当然也包括它本身,

其它的偶看不懂,呵呵
jadge_brt 该用户已被删除
3 [报告]
发表于 2006-06-07 15:15 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
4 [报告]
发表于 2006-06-07 15:27 |只看该作者

这是程序运行的结果

On the first day of Christmas my true love gave to me
a partridge in a pear tree.

On the second day of Christmas my true love gave to me
two turtle doves
and a partridge in a pear tree.

On the third day of Christmas my true love gave to me
three french hens, two turtle doves
and a partridge in a pear tree.

On the fourth day of Christmas my true love gave to me
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the fifth day of Christmas my true love gave to me
five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the sixth day of Christmas my true love gave to me
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the seventh day of Christmas my true love gave to me
seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the eigth day of Christmas my true love gave to me
eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the ninth day of Christmas my true love gave to me
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the tenth day of Christmas my true love gave to me
ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the eleventh day of Christmas my true love gave to me
eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

On the twelfth day of Christmas my true love gave to me
twelve drummers drumming, eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

论坛徽章:
0
5 [报告]
发表于 2006-06-07 20:25 |只看该作者
程序风格不敢苟同
上帝亚救救我吧~~

论坛徽章:
0
6 [报告]
发表于 2006-06-07 20:50 |只看该作者
so amazing...

论坛徽章:
0
7 [报告]
发表于 2006-06-07 21:09 |只看该作者
谁这样递归, 开除他。

论坛徽章:
0
8 [报告]
发表于 2006-06-07 22:19 |只看该作者
原帖由 adm1ner 于 2006-6-7 14:19 发表
//////////////////////////////////////////////////////////////////////
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_ ...

我怎么编译不通过,只想看看结果
--------------------Configuration: amazing - Win32 Debug--------------------
Compiling...
1.cpp
d:\microsoft visual studio\myprojects\amazing\1.cpp(2) : error C2065: 't' : undeclared identifier
d:\microsoft visual studio\myprojects\amazing\1.cpp(2) : error C2065: '_' : undeclared identifier
d:\microsoft visual studio\myprojects\amazing\1.cpp(2) : error C2065: 'a' : undeclared identifier
d:\microsoft visual studio\myprojects\amazing\1.cpp(2) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
d:\microsoft visual studio\myprojects\amazing\1.cpp(2) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

1.obj - 5 error(s), 0 warning(s)

论坛徽章:
0
9 [报告]
发表于 2006-06-07 22:51 |只看该作者
当然不能通过了,明显 LZ 的代码有宏定义在里面

论坛徽章:
0
10 [报告]
发表于 2006-06-07 22:59 |只看该作者
这个代码不是乱码竞赛的吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP