結果
| 問題 | No.3474 Concat Decimal |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-20 22:24:45 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 660 bytes |
| 記録 | |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 85,004 KB |
| 実行使用メモリ | 114,996 KB |
| 最終ジャッジ日時 | 2026-03-20 22:24:48 |
| 合計ジャッジ時間 | 3,838 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 22 |
ソースコード
t = int(input())
for _ in range(t):
n = int(input())
a = list(map(int, input().split()))[1:]
for i in range(n-1):
s = list(str(a[i]))
if s[0] == "0":
continue
while s[-1] == "0":
s.pop()
a[i] = int("".join(s))
if a.count(0) == n-1:
print(1)
continue
cnt2 = [0]*(n-1)
cnt5 = [0]*(n-1)
for i in range(n-1):
while a[i] % 2 == 0 and a[i] != 0:
cnt2[i] += 1
a[i] //= 2
while a[i] % 5 == 0 and a[i] != 0:
cnt5[i] += 1
a[i] //= 2
print(10**(max(max(cnt2), max(cnt5))+1)//2**max(cnt2)//5**max(cnt5))