結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー otamay6otamay6
提出日時 2024-04-20 17:30:00
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 958 ms
コンパイル使用メモリ 81,004 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 13:26:34
合計ジャッジ時間 3,693 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 2 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include <string>
#include<algorithm>

constexpr int mod = 998244353;
int main(){
	int n;std::cin>>n;
	std::vector<int> a(n);
	for(auto& a: a){
		std::cin>>a;
	}
	std::sort(a.begin(), a.end(), [](int a, int b){return std::to_string(a) < std::to_string(b);});
	int x = 0;
	for(auto a: a){
		x = (10*x + a) % mod;
	}
	std::cout << x << std::endl;
}
0