Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 33aa763

Browse files
permutation & product added
1 parent 772fcf0 commit 33aa763

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import itertools
2+
3+
string, permutation_size = input().split()
4+
for permutation in itertools.permutations(sorted(string), int(permutation_size)):
5+
print(''.join(permutation))
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import itertools
2+
3+
A = [int(x) for x in input().split()]
4+
B = [int(y) for y in input().split()]
5+
6+
print(*itertools.product(A, B))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /