結果

問題 No.443 GCD of Permutation
ユーザー Mew_1406Mew_1406
提出日時 2016-11-11 23:55:30
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 209 bytes
コンパイル時間 622 ms
コンパイル使用メモリ 6,644 KB
実行使用メモリ 811,788 KB
最終ジャッジ日時 2023-08-16 20:23:22
合計ジャッジ時間 4,601 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
7,820 KB
testcase_01 AC 20 ms
7,660 KB
testcase_02 AC 20 ms
7,600 KB
testcase_03 AC 21 ms
7,648 KB
testcase_04 AC 104 ms
15,532 KB
testcase_05 AC 21 ms
7,676 KB
testcase_06 AC 19 ms
7,760 KB
testcase_07 AC 20 ms
7,836 KB
testcase_08 AC 19 ms
7,824 KB
testcase_09 AC 20 ms
7,812 KB
testcase_10 AC 19 ms
7,764 KB
testcase_11 AC 20 ms
7,720 KB
testcase_12 AC 19 ms
7,664 KB
testcase_13 AC 21 ms
7,612 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