結果

問題 No.443 GCD of Permutation
コンテスト
ユーザー Mew_1406
提出日時 2016-11-19 11:19:25
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
MLE  
実行時間 -
コード長 251 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 102 ms
コンパイル使用メモリ 80,640 KB
実行使用メモリ 1,047,440 KB
最終ジャッジ日時 2026-07-18 11:12:33
合計ジャッジ時間 5,644 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 10 MLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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