結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー GGanariGGanari
提出日時 2024-04-19 21:34:49
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 539 bytes
コンパイル時間 2,488 ms
コンパイル使用メモリ 205,276 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-11 14:16:52
合計ジャッジ時間 4,604 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define INF 1000000001LL
#define LNF 1000000000000000001LL
#define MOD 998244353LL
#define MAX 1005
#define long long long
#define all(x) x.begin(),x.end()
using namespace std;

int main()
{
	ios_base::sync_with_stdio(0); 
    cin.tie(0);
    
    int n;
    cin >> n;

    vector<long> arr(n);

    for(int i = 0; i<n; i++)
        cin >> arr[i];

    sort(all(arr));
    long x = 0;
    for(int i = 0; i<n; i++)
    {
        x*=10;
        x+=arr[i];
        x%=MOD;
    }
    cout << x << endl;
    return 0;
}
0