結果
問題 | No.2729 Addition and Multiplication in yukicoder (Easy) |
ユーザー |
|
提出日時 | 2024-04-19 21:27:11 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 381 bytes |
コンパイル時間 | 13,577 ms |
コンパイル使用メモリ | 377,664 KB |
実行使用メモリ | 7,936 KB |
最終ジャッジ日時 | 2024-10-11 13:58:49 |
合計ジャッジ時間 | 15,637 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#![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;