Created
July 17, 2016 21:06
-
-
Save vanryan/63506b5645b65d730d55ff2fb8d9910a to your computer and use it in GitHub Desktop.
Revisions
-
vanryan created this gist
Jul 17, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ from itertools import product A = map(int,raw_input().split()) B = map(int,raw_input().split()) A.sort() B.sort() res = product(A, B) # you can also get res from # tmp = [A,B] # res = list(product(*tmp)) for i in res: print i, # you can print faster with: # print " ".join(map(str, res))