Thread: Merry Xmas All
View Single Post
Re: Merry Xmas All
Old
  (#2)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Merry Xmas All - 24-12-2004

(GMT +8 ) 12/24/2004 3:55 PM
Merry x'mas too

PHP Code:
/* got this from bbs.fudan.edu.cn */
          
A
          
,
         
B,J
          
=
         
34;
        
char*
          
S
         
,*P
        
;I;q(
       
I){for(
          ;
         --
I
        
;p(32
       
));}p(C
      
){putchar
          
(
         
C);
        }
r(){
       for(;--
      
I&&*S;p(*
     
S++));}main
          
(
         ) {
        for(
P
       
=S;S;p(
      
10))A==B?
     
A++,B=1:B++
    ,
q(12-B),P?r(
          
I
         
=B*
        
2),!*
       
S?S=P,P
      
=0:0:B>1?
     
p(J),r(I=B*
    
2-2),p(J),I?q
   
(I),p(59),S=0:0
          
:
         
(
        
35);}
       
char*S=
      
"A,B,J=3"
     "4;char*S,"
    "*P;I;q(I){f"
   "or(;--I;p(32)"
  ");}p(C){putchar"
          
#
         
"("
        "C);"
       "}r(){"
      "for(;--"
     "I&&*S;p(*"
    "S++));}main"
   "() {for(P=S;S"
  ";p(10))A==B?A++"
",B=1:B++,q(12-B),"
          
#
         
"P"
        "?r("
       "I=B*2"
      "),!*S?S"
     "=P,P=0:0:"
    "B>1?p(J),r("
   "I=B*2-2),p(J)"
  ",I?q(I),p(59),S"
"=0:0:p (35);}char"
"*S="               

(note: the above is pre-standard C so compile it with .c extension and don't use .cpp)

Last edited by Whistler; 24-12-2004 at 09:11..
  
Reply With Quote