Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ZundokoSwift
import UIKit
var a = UInt32.max
while a&0x1f != 1{
a = (a<<1)|arc4random_uniform(2)
print(a&1==1 ?"ズン":"ドコ")
}
print("キ・ヨ・シ!")
var b = Array<Int>()
while(b.suffix(5) != [0,0,0,0,1]){
b.append((Int)(arc4random_uniform(2)))
print(["ズン", "ドコ"][b.last!])
}
print("キ・ヨ・シ!")
@sandinist
Owner

1行で

import UIKit;var a = UInt32.max;while a&0x1f != 1{a = (a<<1)|arc4random_uniform(2);print(a&1==1 ?"ズン":"ドコ")};print("キ・ヨ・シ!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment