Created
June 4, 2014 17:34
-
-
Save n-yoda/e4a20c6dd891dca08879 to your computer and use it in GitHub Desktop.
STAP細胞
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
public class FindStap | |
{ | |
public static void Main() | |
{ | |
var rand = new Random(); | |
var inf = Enumerable.Repeat("", 1); | |
inf = inf | |
.SelectMany(_ => Enumerable.Repeat("", 1).Concat(inf)) | |
.Select(_ => "AAAA".Select(a => (char)(a + rand.Next(26)))) | |
.TakeWhile(x => !x.SequenceEqual("STAP")) | |
.Select(x => new String(x.Concat("細胞").ToArray())) | |
.Concat(new[]{ "STAP細胞", "陽性確認!" }); | |
foreach (var str in inf) | |
{ | |
Console.WriteLine(str); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment