0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ズンドコキヨシ with Wren

Last updated at Posted at 2016-03-11

参考: http://qiita.com/y__sama/items/7c451dfd706f9b36729d

import "random" for Random
var z = "ズン"
var d = "ドコ"
var zd = [z, d]
var expected = [z, z, z, z, d].join()
var random = Random.new()
var tmp = []
(0..4).each {tmp.add(random.sample(zd))}
var actual = tmp.join()
System.print(actual)
while(actual != expected) {
    tmp.removeAt(0)
    var x = random.sample(zd)
    System.print(x)
    tmp.add(x)
    actual = tmp.join()
}
System.print("キ・ヨ・シ!")

Playground

スクリーンショット_031216_012204_AM.jpg

外部サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?