結果

問題 No.443 GCD of Permutation
ユーザー Mew_1406Mew_1406
提出日時 2016-11-11 23:57:10
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 209 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 6,640 KB
実行使用メモリ 813,516 KB
最終ジャッジ日時 2023-08-16 20:23:31
合計ジャッジ時間 3,696 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
7,688 KB
testcase_01 AC 22 ms
7,828 KB
testcase_02 AC 22 ms
7,800 KB
testcase_03 AC 24 ms
7,652 KB
testcase_04 AC 115 ms
15,564 KB
testcase_05 AC 22 ms
7,648 KB
testcase_06 AC 22 ms
7,612 KB
testcase_07 AC 23 ms
7,692 KB
testcase_08 AC 22 ms
7,668 KB
testcase_09 AC 24 ms
7,836 KB
testcase_10 AC 22 ms
7,652 KB
testcase_11 AC 24 ms
7,684 KB
testcase_12 AC 22 ms
7,760 KB
testcase_13 AC 22 ms
7,708 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 fractions import gcd
from itertools import permutations
st=raw_input()
lst=[]
for l in list(permutations(st,len(st))):
    lst.append(reduce(lambda x,y: x+y,l).lstrip("0"))
print reduce(gcd, map(int,lst))
0