荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: huhaiming (一生只爱她), 信区: Program
标 题: [合集]史上最让人尖叫的C语言代码
发信站: 荔园晨风BBS站 (2004年10月30日09:23:37 星期六), 站内信件
☆ 1 ──────────── 我是分割线 ─────────────────☆
发信人: lvyou (窗外的那片飘叶), 信区: Program
标 题: 史上最让人尖叫的C语言代码
时 间: Fri Jun 11 19:57:39 2004
下面这个C语言程序可以排出一首优美的长诗出来,真不知作者是怎么设计出来的,
感觉是非人脑可做,是否有巧妙的办法可以写这样的程序?
程序代码:
#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' ')# \
}'+}##(!!/")
: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);}
这段代码我在TC2下运行通过,运行结果是:
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.
☆ 2 ──────────── 我是分割线 ─────────────────☆
发信人: xiaobd (3:16), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Fri Jun 11 21:16:10 2004
看不懂
嗯~~~
☆ 3 ──────────── 我是分割线 ─────────────────☆
发信人: peng (fei), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sat Jun 12 13:38:04 2004
c语言混乱码大赛的作品
☆ 4 ──────────── 我是分割线 ─────────────────☆
发信人: kid (冬眠后的春天,沉睡前的秋天), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sat Jun 12 14:53:36 2004
这个版的反面教材吧?!!
☆ 5 ──────────── 我是分割线 ─────────────────☆
发信人: cycker (风吹不散笑容), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sat Jun 12 16:24:23 2004
真的能通过,不过看不懂,好象用到了宏是吧?
☆ 6 ──────────── 我是分割线 ─────────────────☆
发信人: Dreamer (我与萤火虫), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sat Jun 12 20:38:06 2004
没有用到宏,反复递归调用main函数而已。
中间有一个很长的串,好像经过算法加密过。
☆ 7 ──────────── 我是分割线 ─────────────────☆
发信人: lvyou (窗外的那片飘叶), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sat Jun 12 20:54:30 2004
嗯,这是偶见过的递归运用最变态的一个程序,感觉好像一个天才数学家在反推
出来的一般,不知是否有公式能解释证明一下的呢?应该有什么工具辅助推理的,不
然靠人工来想,不想到脑浆干涸都想不出来吧。
☆ 8 ──────────── 我是分割线 ─────────────────☆
发信人: gxdx (讨厌电脑), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sat Jun 12 22:41:06 2004
用源码生成源码。
下面这个C语言程序可以排出一首优美的长诗出来,真不知作者是怎么设计出来的,
感觉是非人脑可做,是否有巧妙的办法可以写这样的程序?
程序代码:
#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' ')# \
}'+}##(!!/")
: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);}
这段代码我在TC2下运行通过,运行结果是:
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.
☆ 9 ──────────── 我是分割线 ─────────────────☆
发信人: cycker (风吹不散笑容), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sun Jun 13 10:25:50 2004
传说中的源码之源?
☆ 10 ──────────── 我是分割线 ─────────────────☆
发信人: gxdx (讨厌电脑), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sun Jun 13 14:12:22 2004
原理差不多吧,方向不一样。^_^
☆ 11 ──────────── 我是分割线 ─────────────────☆
发信人: LAWMAN (泡着茶看风景), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Sun Jun 13 19:37:54 2004
不用问他应该也不懂呵呵
☆ 12 ──────────── 我是分割线 ─────────────────☆
发信人: barret (BUCKET STOP HERE), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Tue Jun 22 19:16:35 2004
强~~实在是强
呵呵~~天书
☆ 13 ──────────── 我是分割线 ─────────────────☆
发信人: yuxujian (I prefer RedHat to Windows !), 信区: Program
标 题: Re: 史上最让人尖叫的C语言代码
时 间: Wed Jun 23 21:55:51 2004
On the first day of Christmas my traue love gave to me
a partridge in a pear tree.
On the second day of Christmas my traue love gave to me
two turtle doves
and a partridge in a pear tree.
On the third day of Christmas my traue love gave to me
three french hens, two turtle doves
and a partridge in a pear tree.
On the fourth day of Christmas my traue 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 traue 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 traue 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 traue 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 traue 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 traue 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 traue 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 traue 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 traue 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.
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.36.3]
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.36.3]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店