結果
| 問題 | No.3474 Concat Decimal |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-20 21:42:16 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 123 ms / 2,000 ms |
| コード長 | 670 bytes |
| 記録 | |
| コンパイル時間 | 2,249 ms |
| コンパイル使用メモリ | 332,724 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-20 21:42:23 |
| 合計ジャッジ時間 | 4,151 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
int t;
cin>>t;
while(t--){
int n,tm;
int n2=0,n5=0;
cin>>n>>tm;
for(int i=0;i<n-1;i++){
int a;
cin>>a;
int tmp2=to_string(a).size(),tmp5=to_string(a).size();
while(a%2==0&&tmp2>0){
tmp2--;
a/=2;
}
while(a%5==0&&tmp5>0){
tmp5--;
a/=5;
}
n2=max(tmp2,n2);
n5=max(tmp5,n5);
}
int a=1;
while(n2--)a*=2;
while(n5--)a*=5;
cout<<a<<endl;
}
return 0;
}