結果
問題 | No.2729 Addition and Multiplication in yukicoder (Easy) |
ユーザー |
|
提出日時 | 2024-04-19 22:42:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 157 ms / 2,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 1,868 ms |
コンパイル使用メモリ | 171,440 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 16:28:00 |
合計ジャッジ時間 | 5,065 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<long long> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); long long ans = 0; long long mod = 998244353; for (int i = 0; i < n; i++) { ans *= 10; ans += a[i]; ans %= mod; } cout << ans << endl; }