Advertisement
Guest User

Obfuscated Csharp

a guest
Nov 3rd, 2011
1,690
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.18 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace _a
  7. {
  8.     abstract class cc {private cc _v0; public abstract cc e(cc arg);
  9.         public cc v { get { cc tmp = this; if (_v0 != null) tmp = _v0;
  10.             while (tmp is L) tmp = ((L)tmp).run(); _v0 = tmp; return tmp; }}
  11.         public object vl { get { cc tmp = v; if(tmp is O) return ((O)tmp).value; else return new O(){value=tmp};}}}
  12.     class ccI : cc {public override cc e(cc arg) {return arg;}}
  13.     class ccK0 : cc {public cc x = null; public override cc e(cc arg) { return x; }}
  14.     class ccK : cc {public override cc e(cc arg) { return new ccK0() { x = arg };}}
  15.     class ccS0 : cc {public cc x;public override cc e(cc arg){return new ccS1(){y=arg,x=x};}}
  16.     class ccS1 : cc {public cc x,y;public override cc e(cc arg){var a1 = new L() { f = x, a = arg };
  17.             return new L(){f=a1,a=new L(){f=y,a=arg}};}}
  18.     class ccS : cc {public override cc e(cc arg) { return new ccS0() { x = arg };}}
  19.     class O : cc { public object value; public override cc e(cc arg) { return this; } };
  20.     class F0 : cc { public cc x; public Func<object, Func<object, object>> f;
  21.      public override cc e(cc arg){var x1=x.v;var a1=arg.v;
  22.          return new O(){value=f(x1.vl)(a1.vl)};}}
  23.     class F : cc {public Func<object, Func<object, object>> f;public override cc e(cc arg){return new F0(){f=f,x=arg};}}
  24.     class L : cc {public cc f, a;public cc run(){var f1=f.v;return f1.e(a);}
  25.         public override cc e(cc arg){return this;}}
  26.     class Sel : cc {public override cc e(cc arg){return new Sel0(){a=arg};}}
  27.     class Sel0 : cc {public cc a; public override cc e(cc arg){return new Sel1(){a=a,b=arg};}}
  28.     class Sel1 : cc {public cc a, b; public override cc e(cc arg) {if((bool)a.vl) return b; else return arg;}}
  29.  
  30.     class cc1
  31.     {
  32.         static cc o(object v){return new O(){value=v};} static cc a(cc x,cc y){return new L(){f=x,a=y};}
  33.         static cc I=new ccI(),S=new ccS(),K=new ccK(),select=new Sel(),
  34.           B=a(a(S,a(K,S)),K),
  35.           C=a(a(S,a(a(S,a(K,S)),a(a(S,a(K,K)),S))),a(K,K)),
  36.           BS=a(a(S,a(a(S,a(K,S)),a(a(S,a(K,K)),a(a(S,a(K,S)),a(a(S,a(K,K)),a(a(S,a(K,S)),K)))))),a(K,a(a(S,a(K,S)),K))),
  37.           SS=a(a(S,a(K,a(S,a(K,S)))),a(a(S,a(K,S)),K)),
  38.           mul=new F(){f=x=>y=>(int)x*(int)y},add=new F(){f=x=>y=>(int)x+(int)y},sub=new F(){f=x=>y=>(int)x-(int)y},
  39.           seq=new F(){f=x=>y=>y},eq=new F(){f=x=>y=>(int)x==(int)y},gr=new F(){f=x=>y=>(int)x>(int)y},
  40.       eqv=new F(){f=x=>y=>(x==null && y==null)||(x.Equals(y))},nil=new O(){value=null},
  41.           print=new F(){f=io=>v=>{Console.Write(v);return null;}};
  42.  
  43.       ///////////////////////////
  44. static cc res1=a(a(a(a(a(a(a(SS,a(SS,a(SS,S))),a(a(a(SS,a(SS,a(SS,C))),a(a(a(SS,a(SS,a(SS,S))),a(a(a(SS,a(SS,a(SS,C))),a(a(a(SS,a(SS,a(SS,a(SS,a(SS,C))))),a(a(a(SS,C),a(a(C,a(a(a(BS,a(BS,a(SS,a(SS,C)))),a(BS,a(a(BS,a(a(BS,C),a(a(BS,BS),C))),a(C,a(a(a(BS,a(SS,C)),a(a(SS,C),a(a(C,a(a(a(BS,a(SS,BS)),a(C,BS)),a(a(C,I),o(100)))),a(K,a(C,I))))),a(a(a(BS,K),a(C,I)),a(a(C,I),o(1)))))))),a(BS,K))),a(a(a(SS,a(SS,a(SS,C))),a(a(C,a(a(a(BS,C),a(a(BS,S),a(a(BS,C),a(a(BS,SS),C)))),a(a(C,a(a(C,a(a(a(BS,BS),a(SS,a(SS,C))),a(a(a(SS,a(SS,C)),a(a(C,a(a(a(BS,a(BS,a(a(BS,C),a(a(BS,SS),C)))),C),a(a(S,a(a(a(BS,a(BS,a(SS,C))),C),a(a(BS,a(BS,B)),B))),a(a(B,C),a(a(S,a(SS,BS)),a(a(B,K),a(a(C,I),o("Fizz")))))))),K)),a(K,I)))),K)),K))),I)),a(K,K)))),a(a(B,K),K))),a(K,a(a(B,a(B,a(B,K))),a(a(a(SS,a(SS,a(SS,a(SS,C)))),a(a(C,a(a(a(BS,C),a(a(BS,S),a(a(BS,C),a(a(BS,C),a(a(BS,SS),C))))),a(a(a(SS,a(SS,a(SS,a(SS,a(SS,C))))),a(a(C,a(a(a(BS,C),a(a(BS,S),a(a(BS,C),a(a(BS,C),a(a(BS,C),a(a(BS,SS),C)))))),a(a(a(SS,a(SS,a(SS,a(SS,a(SS,a(SS,C)))))),a(a(C,a(a(a(BS,C),a(a(BS,S),a(a(BS,C),a(a(BS,C),a(a(BS,C),a(a(BS,C),a(a(BS,SS),C))))))),a(a(a(SS,a(SS,a(SS,a(SS,a(SS,a(SS,a(SS,C))))))),a(a(a(SS,a(SS,S)),a(a(C,a(a(a(BS,a(BS,a(a(BS,C),a(a(BS,C),a(a(BS,C),a(a(BS,C),a(a(BS,C),a(a(BS,SS),C)))))))),C),a(a(C,a(a(a(BS,a(BS,a(SS,a(SS,a(SS,a(SS,a(SS,C))))))),a(SS,C)),a(a(S,a(a(a(SS,BS),a(a(a(BS,a(BS,a(SS,a(SS,a(SS,a(SS,SS)))))),a(SS,a(SS,a(SS,a(BS,C))))),a(a(a(SS,a(SS,C)),a(a(a(SS,C),a(a(C,a(a(a(BS,C),a(a(BS,BS),BS)),a(a(BS,BS),B))),BS)),I)),K))),a(K,a(a(BS,K),K)))),a(a(a(SS,C),a(a(a(BS,a(a(BS,a(BS,K)),a(SS,C))),C),a(a(a(SS,C),a(a(BS,BS),BS)),I))),a(K,K))))),a(a(a(BS,K),K),a(a(a(BS,K),K),K))))),a(a(a(BS,K),K),a(a(a(BS,K),K),K)))),a(K,a(K,I)))),a(K,a(a(a(BS,K),K),a(a(a(BS,K),K),K)))))),I)),a(K,a(a(B,K),a(a(a(BS,K),K),K)))))),I)),a(K,a(a(a(BS,K),K),K))))),I)),a(K,a(a(B,K),K))))))),a(a(C,a(BS,K)),a(a(a(SS,B),S),a(K,a(a(C,B),a(a(C,add),o(1)))))))),a(a(C,a(a(a(BS,B),B),B)),a(a(a(SS,C),a(a(C,a(a(a(BS,a(SS,BS)),a(a(BS,a(BS,a(a(SS,B),a(a(a(SS,select),a(a(C,eq),o(0))),a(K,nil))))),B)),SS)),a(K,a(a(SS,C),a(a(C,a(BS,B)),a(a(C,sub),o(1))))))),a(K,K))))),a(K,a(K,a(K,a(a(C,a(a(a(SS,select),a(a(C,eqv),o("Fizz"))),a(K,o("FizzBuzz")))),o("Buzz"))))))),a(a(B,K),a(a(a(SS,B),a(a(C,BS),a(B,a(S,a(a(a(SS,select),a(a(C,eqv),nil)),a(K,nil)))))),a(K,a(C,a(a(a(BS,C),a(a(BS,S),a(a(BS,a(a(SS,seq),a(a(S,print),I))),a(a(SS,seq),a(a(C,print),o("\n")))))),a(C,a(BS,K)))))))),a(a(S,a(a(C,B),a(a(S,I),I))),a(a(C,B),a(a(S,I),I)))),a(a(B,C),a(C,I))),a(a(C,I),K)),a(a(C,I),a(K,I))).v;
  45. static void Main(){if(res1==null) o(0);}
  46.    }
  47. }
  48.  
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement