結果

問題 No.443 GCD of Permutation
コンテスト
ユーザー Mew_1406
提出日時 2016-11-11 23:55:30
言語 PyPy2
(7.3.15)
結果
MLE  
実行時間 -
コード長 209 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 77,232 KB
最終ジャッジ日時 2025-12-03 22:40:23
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10 MLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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