エントリーの編集
                エントリーの編集は全ユーザーに共通の機能です。
                    必ずガイドラインを一読の上ご利用ください。
競プロでよく使うけど空で書けないフレーズ - Qiita
記事へのコメント0件
- 注目コメント
 - 新着コメント
 
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
          - バナー広告なし
 - ミュート機能あり
 - ダークモード搭載
 
関連記事
競プロでよく使うけど空で書けないフレーズ - Qiita
from itertools import permutations, combinations, product L = [1,2,3,4]; k = 2 for p in permutati... from itertools import permutations, combinations, product L = [1,2,3,4]; k = 2 for p in permutations(L,k): print(p,end=' ') #(1, 2) (1, 3) (1, 4) (2, 1) (2, 3) (2, 4) (3, 1) (3, 2) (3, 4) (4, 1) (4, 2) (4, 3) for c in combinations(L,k): print(c, end=' ') #(1, 2) (1, 3) (1, 4) (2, 3) (2, 4) (3, 4) N = 3 for pro in product((0,1), repeat=N): print(pro, end=' ') # (0, 0, 0) (0, 0, 1) (0, 1, 0) (0, 1,
              
            

