結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー Spica08
提出日時 2024-05-11 18:09:11
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 180 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 2,117 ms
コンパイル使用メモリ 199,368 KB
最終ジャッジ日時 2025-02-21 13:42:39
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using Matrix = vector<vector<ll>>;
const int inf = 1000000000;
const ll INF = 1000000000000000000;
const ll mod = 998244353;
const ull mod_hash = (1UL << 61) - 1;
const vector<int> dx = {0, 1, 0, -1, 1, 1, -1, -1};
const vector<int> dy = {1, 0, -1, 0, 1, -1, 1, -1};

int main(){
  int N;cin>>N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) cin>>A[i];
  sort(A.begin(), A.end());
  ll ans = 0;
  for (int i = 0; i < N; i++) {
    ans *= 10;
    ans += A[i];
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
0