結果
問題 | No.2729 Addition and Multiplication in yukicoder (Easy) |
ユーザー |
![]() |
提出日時 | 2024-04-25 15:11:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 1,987 ms |
コンパイル使用メモリ | 199,084 KB |
最終ジャッジ日時 | 2025-02-21 08:57:03 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;int main(){cin.tie(nullptr);ios_base::sync_with_stdio(false);ll N, A, ans=0;cin >> N;vector<ll> v;for (int i=0; i<N; i++){cin >> A;v.push_back(A);}const ll modc = 998244353;sort(v.begin(), v.end());for (auto x : v){x %= modc;ans *= 10;ans += x;ans %= modc;}cout << ans << endl;return 0;}