結果

問題 No.443 GCD of Permutation
ユーザー Mew_1406
提出日時 2016-11-11 23:57:10
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 209 bytes
コンパイル時間 245 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 1,630,720 KB
最終ジャッジ日時 2024-11-25 10:25:37
合計ジャッジ時間 39,213 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 MLE * 2
other AC * 5 TLE * 12 MLE * 11
権限があれば一括ダウンロードができます

ソースコード

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