Skip to main content
Better code
Source Link

C#, 816 803 741 737737 703 chars

class r{static void Main(){new u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?@"]^(Gi+^ upOoh,>-)?|{?0|*?We'+]n|£^I each#forjust sowanna:3%&Gotta long8r2u+ersta+^*|$(Ooh)!gi<, hear9ach=ne<r_gi<^(G-)^|*!g-!let% but8}7odown!run1rou+{desert%!2cry!say>oodbye!t31 shy7lie{hurt%^|3ell|2make% say|#^We'<4n it?Insideeach weo/r both]for wha9go=s;long[r onhear~1ch?We]@e gamebut[.:we}&playo;shy:;s=Inside it?|-?[,we 1)|8?You|$both}wha~>o?I just wanna ;^!Gotta _ understand?|on^We}/>ame{we._pl=|!^Ne<r_|& how I'm feel=feel?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6;^|_>onna a|=ay lie:hurt^|~_|_make^|^it^|[^You|^
|-i<% you|&up|% gonnayou|{1+ |?\r\n|: and |;tell|[(Ooh|]}4 know|#|4 otherknow|~t's |+ve|=ing|7been|: to|9t'st|;o been|<ve|> |}'re|@g|?ing|/the|.'re|+nd|1 th"a");}class u{public u(string c){var a="We} no strangers7 lo+8]@e. rulesn;strangers:so do;love[}/ I?Arules{s;d;I^A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*AndI'm:hink? if^of[ askwouldn't>et:his me!Don'tfrom1ny ;o/r>uy£#A+ me^}7oif%1sk blind7me&Don't:3 see?%%--?££*$%%%";foreachme%.:o;bli+:;see^**]]^$$#£**";foreach(var b in c.Split('|'))a=a.Replace(b[0]+"",b.Substring(1));System.Console.Write(a);}}}
class r
{
    static void Main()
    {
        new u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?@"]^(Gi+^ upOoh,>-)?|{?0|*?We'+]n|£^I each#forjust sowanna:3%&Gotta long8r2u+ersta+^*|$(Ooh)!gi<, hear9ach=ne<r_gi<^(G-)^|*!g-!let% but8}7odown!run1rou+{desert%!2cry!say>oodbye!t31 shy7lie{hurt%^|3ell|2make% say|#^We'<4n it?Insideeach weo/r both]for wha9go=s;long[r onhear~1ch?We]@e gamebut[.:we}&playo;shy:;s=Inside it?|-?[,we 1)|8?You|$both}wha~>o?I just wanna ;^!Gotta _ understand?|on^We}/>ame{we._pl=|!^Ne<r_|& how I'm feel=feel?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6;^|_>onna a|=ay lie:hurt^|~_|_make^|^it^|[^You|^
|-i<% you|&up|% gonnayou|{1+ |?\r\n|: and |;tell|[(Ooh|]}4 know|#|4 otherknow|~t's |+ve|=ing|7been|: to|9t'st|;o been|<ve|> |}'re|@g|?ing|/the|.'re|+nd|1 th"a");
    } 

    class u
    {
        public u(string c)
        {
            var a = "We} no strangers7 lo+8]@e. rulesn;strangers:so do;love[}/ I?Arules{s;d;I^A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*AndI'm:hink? if^of[ askwouldn't>et:his me!Don'tfrom1ny ;o/r>uy£#A+ me^}7oif%1sk blind7me&Don't:3 see?%%--?££*$%%%";me%.:o;bli+:;see^**]]^$$#£**";

            foreach (var b in c.Split('|'))
                a = a.Replace(b[0] + "", b.Substring(1));

            System.Console.Write(a);
        }
    }
}

No more optimisation - I had to write myself a quick n dirty zip engine to get it this small!

C#, 816 803 741 737 chars

class r{static void Main(){new u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");}class u{public u(string c){var a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";foreach(var b in c.Split('|'))a=a.Replace(b[0]+"",b.Substring(1));System.Console.Write(a);}}}
class r
{
    static void Main()
    {
        new u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");
    }
    class u
    {
        public u(string c)
        {
            var a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

            foreach (var b in c.Split('|'))
                a = a.Replace(b[0] + "", b.Substring(1));

            System.Console.Write(a);
        }
    }
}

C#, 816 803 741 737 703 chars

class r{static void Main(){new u(@"]^(Ooh,>-)|£^I just wanna:3%&Gotta 2u+ersta+^*|$(Ooh)!gi<, ne<r_gi<^(G-)^|*!g-!let% down!run1rou+{desert%!2cry!say>oodbye!t31 lie{hurt%^|3ell|2make% |#^We'<4n each o/r for s;long[r hear~1ch? but[.:o;shy:;s=Inside we both}wha~>o? on^We}/>ame{we._pl=|!^Ne<r_|& how I'm feel?^|_>onna |=ay it^|[^You|^
|-i<% up|% you|{1+ |}4 |4 know|~t's been|: t|;o |<ve|> g|?ing|/the|.'re|+nd|1 a");}class u{public u(string c){var a="We. n;strangers:;love[}/ rules{s;d;I^A full commitment's what I'm:hink? of[ wouldn't>et:his from1ny o/r>uy£#A+ if%1sk me&Don't:3 me%.:o;bli+:;see^**]]^$$#£**";foreach(var b in c.Split('|'))a=a.Replace(b[0]+"",b.Substring(1));System.Console.Write(a);}}}
class r
{
    static void Main()
    {
        new u(@"]^(Ooh,>-)|£^I just wanna:3%&Gotta 2u+ersta+^*|$(Ooh)!gi<, ne<r_gi<^(G-)^|*!g-!let% down!run1rou+{desert%!2cry!say>oodbye!t31 lie{hurt%^|3ell|2make% |#^We'<4n each o/r for s;long[r hear~1ch? but[.:o;shy:;s=Inside we both}wha~>o? on^We}/>ame{we._pl=|!^Ne<r_|& how I'm feel?^|_>onna |=ay it^|[^You|^
|-i<% up|% you|{1+ |}4 |4 know|~t's been|: t|;o |<ve|> g|?ing|/the|.'re|+nd|1 a");
    } 

    class u
    {
        public u(string c)
        {
            var a = "We. n;strangers:;love[}/ rules{s;d;I^A full commitment's what I'm:hink? of[ wouldn't>et:his from1ny o/r>uy£#A+ if%1sk me&Don't:3 me%.:o;bli+:;see^**]]^$$#£**";

            foreach (var b in c.Split('|'))
                a = a.Replace(b[0] + "", b.Substring(1));

            System.Console.Write(a);
        }
    }
}

No more optimisation - I had to write myself a quick n dirty zip engine to get it this small!

Realised a nested class with work in the constructor was more concise than a static method. Shared my findings for this here http://codegolf.stackexchange.com/a/6210/4633 Also, removed unnecessary braces.
Source Link

C#, 816 803 741741 737 chars

class r{static void p(string c){foreach(var b in c.Split('|')){a=a.Replace(b[0]+"",b.Substring(1));}}static string a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";static void Main(){pnew u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");System.Console.Write(a);}}

And a more readable version:

class r
u{
    static voidpublic pu(string c)
    {
        foreach (var b in c.Split('|'))
        {
            a = a.Replace(b[0] + "", b.Substring(1));
        }
    }

    static string a = "Wea="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";££*$%%%";foreach(var b in c.Split('|'))a=a.Replace(b[0]+"",b.Substring(1));System.Console.Write(a);}}}

And a more readable version:

class r
{
    static void Main()
    {
        pnew u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");
    }
    class u
    {
        public u(string c)
        {
            var a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

            foreach (var b in c.Split('|'))
                a = a.Replace(b[0] + "", b.Substring(1));

            System.Console.Write(a);
        }
    }
}

C#, 816 803 741 chars

class r{static void p(string c){foreach(var b in c.Split('|')){a=a.Replace(b[0]+"",b.Substring(1));}}static string a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";static void Main(){p("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");System.Console.Write(a);}}

And a more readable version:

class r
{
    static void p(string c)
    {
        foreach (var b in c.Split('|'))
        {
            a = a.Replace(b[0] + "", b.Substring(1));
        }
    }

    static string a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

    static void Main()
    {
        p("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");
        System.Console.Write(a);
    }
}

C#, 816 803 741 737 chars

class r{static void Main(){new u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");}class u{public u(string c){var a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";foreach(var b in c.Split('|'))a=a.Replace(b[0]+"",b.Substring(1));System.Console.Write(a);}}}

And a more readable version:

class r
{
    static void Main()
    {
        new u("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");
    }
    class u
    {
        public u(string c)
        {
            var a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

            foreach (var b in c.Split('|'))
                a = a.Replace(b[0] + "", b.Substring(1));

            System.Console.Write(a);
        }
    }
}
realised that a delimited string had fewer characters than an array, and could save a heap by splitting it when I needed it split. Also, saved a few with string => var.
Source Link

C#, 816 803803 741 chars

class r{static void p(string[]cstring c){foreach(stringvar b in c.Split('|')){a=a.Replace(b[0]+"",b.Substring(1));}}static string a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";static void Main(){p(new[]{"%{1{2{3{4{5{6?","£[|£[){gi+, ne+r&gi+?(Gi+^ up)?","|{?0", "*0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?","|-?[, 1)","8|8?You", "$You|$?I just wanna ;^!Gotta _ understand?","|! how I'm feel=?","0Ne+r&","1gi+^|0Ne+r&|1gi+^ up","2let^up|2let^ down","3rundown|3run around:desert^","4_desert^|4_ cry","5saycry|5say goodbye","6;goodbye|6; a lie:hurt^","~_","_make^","^hurt^|~_|_make^|^ you","&you|& gonna ","|?\r\n","\r\n|: and ",";tell","[|;tell|[(Ooh","]Ooh|] know","#know|# other ","+ve","=ing","7|+ve|=ing|7 to","9t'sto|9t's been ","|}'re","@'re|@ th"});System.Console.Write(a);}}
class r
{
    static void p(string[]string c)
    {
        foreach (stringvar b in c.Split('|'))
        {
            a = a.Replace(b[0] + "", b.Substring(1));
        }
    }

    static string a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

    static void Main()
    {
        p(new[] { 
            "%{1{2{3{4{5{6?"
            , "£[|£[){gi+, ne+r&gi+?(Gi+^ up)?"
            , "|{?0"
            , "*0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?"
            , "|-?[, 1)"
            , "8|8?You"
            , "$You|$?I just wanna ;^!Gotta _ understand?"
            , "|! how I'm feel=?"
            , "0Ne+r&"
            , "1gi+^ up"
            , "2let^ down"
           |0Ne+r&|1gi+^ ,up|2let^ "3rundown|3run around:desert^"
            , "4_ cry"
            , "5say goodbye"
           desert^|4_ ,cry|5say "6;goodbye|6; a lie:hurt^"
            , "~_"
            , "_make^"
            , "^ you"
            ,hurt^|~_|_make^|^ "&you|& gonna "
            , "|?\r\n"
            , "\r\n|: and "
            , ";tell"
            , "[|;tell|[(Ooh"
            , "] know"
            ,Ooh|] "#know|# other "
            , "+ve"
            , "=ing"
            , "7 to"
            ,|+ve|=ing|7 "9t'sto|9t's been "
            , "|}'re"
            , "@'re|@ th" });
        System.Console.Write(a);
    }
}

C#, 816 803 chars

class r{static void p(string[]c){foreach(string b in c){a=a.Replace(b[0]+"",b.Substring(1));}}static string a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";static void Main(){p(new[]{"%{1{2{3{4{5{6?","£[){gi+, ne+r&gi+?(Gi+^ up)?","{?0", "*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?","-?[, 1)","8?You", "$?I just wanna ;^!Gotta _ understand?","! how I'm feel=?","0Ne+r&","1gi+^ up","2let^ down","3run around:desert^","4_ cry","5say goodbye","6; a lie:hurt^","~_","_make^","^ you","& gonna ","?\r\n",": and ",";tell","[(Ooh","] know","# other ","+ve","=ing","7 to","9t's been ","}'re","@ th"});System.Console.Write(a);}}
class r
{
    static void p(string[] c)
    {
        foreach (string b in c)
        {
            a = a.Replace(b[0] + "", b.Substring(1));
        }
    }

    static string a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

    static void Main()
    {
        p(new[] { 
            "%{1{2{3{4{5{6?"
            , "£[){gi+, ne+r&gi+?(Gi+^ up)?"
            , "{?0"
            , "*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?"
            , "-?[, 1)"
            , "8?You"
            , "$?I just wanna ;^!Gotta _ understand?"
            , "! how I'm feel=?"
            , "0Ne+r&"
            , "1gi+^ up"
            , "2let^ down"
            , "3run around:desert^"
            , "4_ cry"
            , "5say goodbye"
            , "6; a lie:hurt^"
            , "~_"
            , "_make^"
            , "^ you"
            , "& gonna "
            , "?\r\n"
            , ": and "
            , ";tell"
            , "[(Ooh"
            , "] know"
            , "# other "
            , "+ve"
            , "=ing"
            , "7 to"
            , "9t's been "
            , "}'re"
            , "@ th" });
        System.Console.Write(a);
    }
}

C#, 816 803 741 chars

class r{static void p(string c){foreach(var b in c.Split('|')){a=a.Replace(b[0]+"",b.Substring(1));}}static string a="We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";static void Main(){p("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");System.Console.Write(a);}}
class r
{
    static void p(string c)
    {
        foreach (var b in c.Split('|'))
        {
            a = a.Replace(b[0] + "", b.Substring(1));
        }
    }

    static string a = "We} no strangers7 lo+8]@e rules:so do I?A full commitment's what I'm@ink= of8 wouldn't get@is from any#guy$%*And if^ ask me!Don't ; me^}7o blind7 see?%%--?££*$%%%";

    static void Main()
    {
        p("%{1{2{3{4{5{6?|£[){gi+, ne+r&gi+?(Gi+^ up)?|{?0|*?We'+]n each#for so long8r hear9ach= but8}7o shy7 say it?Inside we both] wha9go= on?We]@e game:we}&play it?|-?[, 1)|8?You|$?I just wanna ;^!Gotta _ understand?|! how I'm feel=?|0Ne+r&|1gi+^ up|2let^ down|3run around:desert^|4_ cry|5say goodbye|6; a lie:hurt^|~_|_make^|^ you|& gonna |?\r\n|: and |;tell|[(Ooh|] know|# other |+ve|=ing|7 to|9t's been |}'re|@ th");
        System.Console.Write(a);
    }
}
Added more escape characters, reduced total character count
Source Link
Loading
Source Link
Loading