結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
コンテスト
ユーザー Yukino DX.
提出日時 2024-04-19 21:27:11
言語 Rust
(1.97.1 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 19 ms / 2,000 ms
+ 694µs
コード長 381 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 622 ms
コンパイル使用メモリ 182,984 KB
実行使用メモリ 9,088 KB
最終ジャッジ日時 2026-09-14 01:04:49
合計ジャッジ時間 2,974 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#![allow(unused_imports)]
//use itertools::{iproduct, Itertools};
use proconio::input;
use proconio::marker::*;
use std::collections::*;

fn main() {
    input! {
        n:usize,
        mut a:[usize;n],
    }
    a.sort();

    let mut ans = 0;
    for &ai in a.iter() {
        ans = (10 * ans % MOD + ai) % MOD;
    }

    println!("{}", ans);
}

const MOD: usize = 998244353;
0