Skip to content

Instantly share code, notes, and snippets.

@Nucleareal
Created October 20, 2013 09:39
Show Gist options
  • Save Nucleareal/7067134 to your computer and use it in GitHub Desktop.
Save Nucleareal/7067134 to your computer and use it in GitHub Desktop.
いろいろ試したいときはC#がお勧めです。
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