結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー かもめのうでかもめのうで
提出日時 2024-04-20 00:47:04
言語 Rust
(1.77.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 1,673 ms
コンパイル使用メモリ 164,224 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2024-04-20 00:47:09
合計ジャッジ時間 3,105 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 23 ms
7,424 KB
testcase_03 AC 29 ms
5,504 KB
testcase_04 AC 30 ms
5,760 KB
testcase_05 AC 31 ms
5,760 KB
testcase_06 AC 41 ms
7,808 KB
testcase_07 AC 33 ms
6,400 KB
testcase_08 AC 37 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 41 ms
7,808 KB
testcase_13 AC 41 ms
7,808 KB
testcase_14 AC 41 ms
7,808 KB
testcase_15 AC 41 ms
7,808 KB
testcase_16 AC 28 ms
5,888 KB
testcase_17 AC 28 ms
6,144 KB
testcase_18 AC 36 ms
7,168 KB
testcase_19 AC 29 ms
6,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#![allow(unused)]
use proconio::*;
use std::collections::*;

fn main() {
    input! {
        n: usize,
        mut a: [usize; n]
    }
    let modulo = 998244353;
    a.sort();
    let mut x = 0;
    for i in 0..n {
        x *= 10;
        x += a[i];
        x %= modulo;
    }
    println!("{x}")
}
0