結果
| 問題 | No.3474 Concat Decimal |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-03-20 22:17:12 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 275 ms / 2,000 ms |
| + 637µs | |
| コード長 | 633 bytes |
| 記録 | |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 95,724 KB |
| 実行使用メモリ | 106,368 KB |
| 最終ジャッジ日時 | 2026-08-02 14:57:02 |
| 合計ジャッジ時間 | 5,690 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 27 |
ソースコード
from math import gcd
def main():
t = int(input())
need = []
for i in range(30):
for j in range(13):
need.append((2**i)*(5**j))
need.sort()
while need[-1] > 1<<30:
need.pop()
for _ in range(t):
n = int(input())
a = [int(x) for x in input().split()]
ans = 1
for v in a[1:]:
if not v: continue
t = 10**len(str(v))
for x in need:
if (x*v)%t==0:
g = gcd(ans, x)
ans = ans*x//g
break
print(ans)
if __name__ == "__main__":
main()