Created
March 18, 2016 03:06
-
-
Save ria3100/1d5706102ae4bf8db505 to your computer and use it in GitHub Desktop.
ズンドコキヨシ
This file contains 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
''' | |
[‘ズン’, ‘ドコ’]のいずれかをランダムで出力し続け | |
どこかで「ズンズンズンズンドコ」に一致したら「キヨシ」を出力して終了する問題 | |
twitterで先頭に | |
@paiza_run python3: | |
を含めツイート出来るバイト数にする。 | |
''' | |
# coding: utf-8 | |
import random | |
p=print | |
b=0 | |
while b!=30: | |
r=random.randrange(2) | |
p(['ドコ','ズン'][r]) | |
b=(b<<1)+r&31 | |
p('キヨシ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ズン ドコ ドコ ドコ ドコ ドコ ズン ドコ ズン ズン ドコ ズン ズン ドコ ドコ ズン ドコ ズン ドコ ズン ズン ズン ドコ ドコ ズン ズン ドコ ドコ ドコ ズン ドコ ドコ ズン ズン ドコ ドコ ズン ズン ズン ズン ドコ キヨシ
バイト数問題なければ print(str, end='') を付けたかった