結果

問題 No.3474 Concat Decimal
コンテスト
ユーザー 👑 loop0919
提出日時 2026-03-20 16:04:06
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 403 ms / 2,000 ms
コード長 352 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 229 ms
コンパイル使用メモリ 85,256 KB
実行使用メモリ 101,220 KB
最終ジャッジ日時 2026-03-20 20:53:14
合計ジャッジ時間 9,788 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from math import gcd

SIZE = 10


def solve():
    N = int(input())
    A = [int(s) for s in input().split()]

    gcd_val = 10**SIZE

    for i in range(1, N):
        gcd_val = gcd(gcd_val, A[i] * 10 ** (SIZE - len(str(A[i]))))

    print(10**SIZE // gcd_val)


if __name__ == "__main__":
    T = int(input())

    for _ in range(T):
        solve()
0