Created
March 25, 2014 06:44
-
-
Save kamiyaowl/9756333 to your computer and use it in GitHub Desktop.
お誕生日おめでとう!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
おおお誕誕誕生生生日日日おおおめめめでででとととううう!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Linq; | |
class Happy { | |
static void Main() { | |
var str = string.Join("", from p in "お誕生日おめでとう!" select p.Prime(3)); | |
Console.WriteLine(str); | |
} | |
} | |
static class HappyExtension { | |
public static string Prime(this char c,int p) { | |
var sb = new StringBuilder(); | |
for(int i = 0 ; i < p ; ++i) sb.Append(c); | |
return sb.ToString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment