結果
問題 |
No.2729 Addition and Multiplication in yukicoder (Easy)
|
ユーザー |
|
提出日時 | 2024-05-03 17:48:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 87 ms / 2,000 ms |
コード長 | 448 bytes |
コンパイル時間 | 4,028 ms |
コンパイル使用メモリ | 253,948 KB |
最終ジャッジ日時 | 2025-02-21 10:46:27 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include<bits/stdc++.h> using namespace std; #include<atcoder/all> using namespace atcoder; using ll = long long; using mll = modint998244353; ll n; vector<ll> a; void solve(){ sort(a.begin(),a.end()); mll ans = 0; for(ll i = 0; i < n; ++i){ ans = ans*10 + a[i]; } cout<<ans.val()<<endl; } signed main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cin >> n; a = vector<ll>(n); for(ll i = 0; i < n; ++i) cin >> a[i]; solve(); }