結果

問題 No.443 GCD of Permutation
ユーザー minamiminami
提出日時 2019-03-27 05:12:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 278 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-10-11 01:42:59
合計ジャッジ時間 24,751 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 4
other RE * 10 TLE * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
import time
S = input()


def gcd(x, y):
    while(y):
        t = x
        x = y
        y = t % y
    return x


start = time.time()
T = 0.98
g = int(S)
l = list(S)

while time.time() < start + T:
    random.shuffle(l)
    g = gcd(g, int("".join(l)))

print(g)
0