結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー IchigoYPIchigoYP
提出日時 2024-04-19 22:36:10
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 883 bytes
コンパイル時間 4,210 ms
コンパイル使用メモリ 279,540 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 22:36:20
合計ジャッジ時間 7,545 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 142 ms
5,376 KB
testcase_03 AC 73 ms
5,376 KB
testcase_04 AC 81 ms
5,376 KB
testcase_05 AC 91 ms
5,376 KB
testcase_06 AC 151 ms
5,376 KB
testcase_07 AC 105 ms
5,376 KB
testcase_08 AC 139 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 148 ms
5,376 KB
testcase_13 AC 159 ms
5,376 KB
testcase_14 AC 149 ms
5,376 KB
testcase_15 AC 147 ms
5,376 KB
testcase_16 AC 103 ms
5,376 KB
testcase_17 AC 101 ms
5,376 KB
testcase_18 AC 123 ms
5,376 KB
testcase_19 AC 99 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;
using vp = vector<pair<ll, ll>>;
#define mod 998244353
#define all(v) v.begin(), v.end()
#define resort(v) sort(v.rbegin(), v.rend())
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define per(i, n) for (ll i = n - 1; i >= 0; --i)
#define rep2(i, a, n) for (ll i = a; i < n; ++i)
#define per2(i, a, n) for (ll i = n - 1; i >= a; --i)
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
const ll inf = 1ll << 60;
ll dx[] = {1,0,0,-1,1,-1,1,-1};
ll dy[] = {0,1,-1,0,1,1,-1,-1};

int main() {
    ll n,x=0;
    cin >> n;
    vll a(n);
    rep(i,n) cin >> a[i];
    sort(all(a));
    rep(i,n){
        x = x*10 + a[i];
        x %= mod;
    }
    cout << x << endl;
}
0