Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
from itertools import chain, combinations_with_replacement as combi_r def solve(d): n=map(int, d.split(',')) s=set(n) a=[(x,y,z) for x in xrange(1, n[0]+1) for y in xrange(x, n[-1]+1) for z in xrange(max(y, n[-1]/3), n[-1]+1) if s == s&{sum(c) for c in chain(*[combi_r((x,y,z), r) for r in (1,2,3)])}] return not a and 'none' or a[1:] and 'many' or ','.join(map(str, a[0])) from itertools import * de
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く