Created
October 20, 2013 09:39
-
-
Save Nucleareal/7067134 to your computer and use it in GitHub Desktop.
いろいろ試したいときはC#がお勧めです。
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.Linq; | |
class T | |
{ | |
public static void Main() | |
{ | |
var s = ""; var r = new Random(); int i = 0; var q = "らこらこらこ~w"; | |
Console.WriteLine(Enumerable.Range(1, 1000000).ToList().All(x => | |
{ | |
i = x; var c = q[r.Next(q.Length)]; if (x % 10000 == 0) { s = ""; Console.Clear(); } Console.Write(c); | |
return !(s += c).EndsWith(q); | |
}) ? | |
"{0}{0}らこらこできませんでした……" : | |
"{0}{0}{1}回目でらこらこできました" | |
, Environment.NewLine, i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment