結果

問題 No.443 GCD of Permutation
ユーザー Mew_1406Mew_1406
提出日時 2016-11-19 11:19:25
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 251 bytes
コンパイル時間 984 ms
コンパイル使用メモリ 6,640 KB
実行使用メモリ 821,032 KB
最終ジャッジ日時 2023-08-17 21:13:34
合計ジャッジ時間 5,578 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 AC 23 ms
7,912 KB
testcase_02 AC 22 ms
7,940 KB
testcase_03 AC 24 ms
7,848 KB
testcase_04 AC 162 ms
15,564 KB
testcase_05 AC 23 ms
7,756 KB
testcase_06 AC 23 ms
7,768 KB
testcase_07 AC 25 ms
7,872 KB
testcase_08 AC 23 ms
7,816 KB
testcase_09 AC 25 ms
7,848 KB
testcase_10 AC 22 ms
7,728 KB
testcase_11 AC 25 ms
8,108 KB
testcase_12 AC 23 ms
7,912 KB
testcase_13 AC 23 ms
7,776 KB
testcase_14 MLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import chain
from fractions import gcd
from itertools import permutations
st=raw_input()
lst=[]
for l in list(permutations(st,len(st))):
    lst.append( ''.join(list(chain.from_iterable(l))).lstrip("0"))
print reduce(gcd, map(long,lst))
0