結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー Yukino DX.Yukino DX.
提出日時 2024-04-19 21:27:11
言語 Rust
(1.77.0)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 381 bytes
コンパイル時間 6,627 ms
コンパイル使用メモリ 148,608 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2024-04-19 21:27:33
合計ジャッジ時間 2,185 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 22 ms
7,424 KB
testcase_03 AC 27 ms
5,376 KB
testcase_04 AC 27 ms
5,632 KB
testcase_05 AC 29 ms
5,632 KB
testcase_06 AC 37 ms
7,808 KB
testcase_07 AC 31 ms
6,400 KB
testcase_08 AC 36 ms
7,936 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 38 ms
7,808 KB
testcase_13 AC 38 ms
7,808 KB
testcase_14 AC 36 ms
7,808 KB
testcase_15 AC 37 ms
7,808 KB
testcase_16 AC 24 ms
6,016 KB
testcase_17 AC 25 ms
6,016 KB
testcase_18 AC 31 ms
7,040 KB
testcase_19 AC 24 ms
6,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#![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