Last active
August 29, 2015 14:02
-
-
Save gomasy/d544dd4254583237ff2b to your computer and use it in GitHub Desktop.
もっと短く出来ると思う。。。
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.Linq; | |
| public class Stap | |
| { | |
| static string stap; | |
| static int i = 0; | |
| static void Main(string[] args) | |
| { | |
| var rnd = new Random(); | |
| var arr = Enumerable.Range(65, 26).Select(c => (char)c).ToArray(); | |
| while (stap != "STAP") | |
| { | |
| stap = string.Concat(Enumerable.Range(0, 4).Select(n => arr[rnd.Next(arr.Length)])); | |
| Console.Write(stap + "細胞!"); | |
| i++; | |
| } | |
| Console.WriteLine("\n\n" + i + "回目で陽性かくにん!\nよかった☆"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment