結果
| 問題 | No.3474 Concat Decimal |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-03-20 21:58:30 |
| 言語 | Rust (1.93.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 954 bytes |
| 記録 | |
| コンパイル時間 | 1,391 ms |
| コンパイル使用メモリ | 207,512 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-20 21:58:36 |
| 合計ジャッジ時間 | 2,179 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 27 |
ソースコード
// -*- coding:utf-8-unix -*-
fn main() {
input! {
t: usize,
}
for _ in 0..t {
input! {
n: usize,
a: [u32; n],
}
let mut res = 1u64;
for &ae in &a[1..] {
let t = 10u64.pow(ae.to_string().len() as u32);
let b = t / t.gcd(&(ae as u64));
res = res.lcm(&b);
}
println!("{}", res);
}
}
#[allow(unused_imports)]
use {
itertools::*,
num::*,
proconio::input,
std::{
cmp::*,
collections::*,
io::{BufReader, BufWriter, Write, stderr, stdin, stdout},
},
};
#[allow(dead_code)]
trait Change {
fn chmax(&mut self, x: Self);
fn chmin(&mut self, x: Self);
}
impl<T: PartialOrd> Change for T {
fn chmax(&mut self, x: T) {
if *self < x {
*self = x;
}
}
fn chmin(&mut self, x: T) {
if *self > x {
*self = x;
}
}
}