結果
| 問題 |
No.2729 Addition and Multiplication in yukicoder (Easy)
|
| コンテスト | |
| ユーザー |
Tatsu_mr
|
| 提出日時 | 2024-04-19 23:56:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 179 ms / 2,000 ms |
| コード長 | 423 bytes |
| コンパイル時間 | 4,869 ms |
| コンパイル使用メモリ | 253,240 KB |
| 最終ジャッジ日時 | 2025-02-21 05:51:06 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
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());
mint x = mint(0);
for (int i = 0; i < n; i++) {
x *= mint(10);
x += mint(a[i]);
}
cout << x.val() << endl;
}
Tatsu_mr