Skip to content

Instantly share code, notes, and snippets.

@Chirimen-Jako
Last active September 14, 2019 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chirimen-Jako/f1ff9445ac391610eaa012d79fb01817 to your computer and use it in GitHub Desktop.
Save Chirimen-Jako/f1ff9445ac391610eaa012d79fb01817 to your computer and use it in GitHub Desktop.
おっぱいそんちくびんびん♪ (PowerShell)
<#
おっぱい.ps1
2019/08/19: initial release
Microsoft Windows 10 Version 1903 (OS build 18362.295)
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Dedicated to shirasu
https://gist.github.com/8q/a5331c6ef8a205b32125
#>
[string] $realStr = "おっぱいそんちくびんびん"
[array] $oppaiElements = "おっ", "ぱい", "そん", "ちく", "びん", "びん"
[string] $testStr = ""
[int] $count = 0
while ($testStr -notmatch $realStr) {
$count++;
[array] $numList = 0..5 | Sort-Object {Get-Random}
$testStr = -join $numList.ForEach( {$oppaiElements[$_]} )
echo "${count} ${testStr}"
}
echo ("おめでとうございます!" + " " + `
"あなたは${count}回目に${realStr}しました。")
echo "end"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment