結果
| 問題 |
No.2734 Addition and Multiplication in yukicoder (Hard)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-28 17:01:33 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 717 bytes |
| コンパイル時間 | 3,691 ms |
| コンパイル使用メモリ | 284,732 KB |
| 実行使用メモリ | 18,988 KB |
| 最終ジャッジ日時 | 2025-03-28 17:01:43 |
| 合計ジャッジ時間 | 8,869 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) (void(0))
#endif
void run_case();
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int T = 1;
// cin >> T;
while (T--) run_case();
return 0;
}
void run_case() {
int N;
cin >> N;
vector<string> A(N);
for(int i = 0; i < N; i++) cin >> A[i];
sort(A.begin(), A.end());
const int md = 998244353;
ll ans = 0;
for(int i = 0; i < N; i++)
{
for(int j = 0; j < A[i].size(); j++) {
ans *= 10;
ans += A[i][j] - '0';
ans %= md;
}
}
cout << ans << endl;
}