We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
python docs
예) 입력 1000000 출력 1,000,000
1 1 1 1 1 2 1 1 2 2 1 1 1 1 1 2 2 1 3 1 2 2 2 1 1 3 1 1 1 2 3 1 2 3 1 1 1 1 2 2 1 3 1 1 1 2 1 3 1 1 3 1 1 2 2 1 1 3 1 1 3 2 1 1 1 3 1 1 2 3 1
>>> import itertools >>> seq = [1] >>> for i in range(10): ... print ' '.join(map(str, seq)) ... seq2 = [] ... for key, subgroup in itertools.groupby(seq): ... seq2 += [key, len(list(subgroup))] ... seq = seq2 ...
ask.python.kr ( falsetru )