結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー umaumax
提出日時 2017-05-02 21:40:10
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 67,036 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 04:47:12
合計ジャッジ時間 929 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>

using namespace std;

int main(int argc, const char* argv[])
{
	string s;
	cin >> s;
	map<char, int> m;
	for (auto&& c : s) m[c]++;
	for (int i = 9; i >= 0; i--) {
		char c = '0' + i;
		for (int j = 0; j < m[c]; j++) cout << c;
	}
	cout << endl;
	return 0;
}
0