結果

問題 No.443 GCD of Permutation
ユーザー ieneko18ieneko18
提出日時 2016-11-12 00:00:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 228 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 820,824 KB
最終ジャッジ日時 2023-08-16 20:25:52
合計ジャッジ時間 3,203 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,416 KB
testcase_01 AC 15 ms
8,288 KB
testcase_02 AC 15 ms
8,380 KB
testcase_03 AC 14 ms
8,264 KB
testcase_04 AC 40 ms
13,264 KB
testcase_05 AC 15 ms
8,300 KB
testcase_06 AC 14 ms
8,296 KB
testcase_07 AC 14 ms
8,472 KB
testcase_08 AC 14 ms
8,140 KB
testcase_09 AC 14 ms
8,392 KB
testcase_10 AC 14 ms
8,412 KB
testcase_11 AC 15 ms
8,368 KB
testcase_12 AC 14 ms
8,312 KB
testcase_13 AC 13 ms
8,156 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 #

import math,itertools
def g(e):
    n=list(itertools.permutations(e))
    for i in range(len(n)):
        n[i]=int("".join(n[i]))
    x=n[0]
    for i in range(1,len(n)):
        x=math.gcd(n[i],x)
    return x
print(g(input()))
0