結果
| 問題 |
No.2729 Addition and Multiplication in yukicoder (Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-19 21:35:58 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 2,000 ms |
| コード長 | 353 bytes |
| コンパイル時間 | 2,996 ms |
| コンパイル使用メモリ | 250,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 14:18:44 |
| 合計ジャッジ時間 | 4,539 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include<bits/stdc++.h>
#define mod 998244353
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<long long> a(n);
for(auto &nx : a){cin >> nx;}
sort(a.begin(),a.end());
long long x=0;
for(auto &nx : a){
x*=10; x%=mod;
x+=nx; x%=mod;
}
cout << x << "\n";
return 0;
}