結果
| 問題 | No.256 桁の数字を入れ替え (2) |
| コンテスト | |
| ユーザー |
aaa
|
| 提出日時 | 2018-11-07 09:19:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 659 bytes |
| 記録 | |
| コンパイル時間 | 819 ms |
| コンパイル使用メモリ | 95,564 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-20 20:38:11 |
| 合計ジャッジ時間 | 1,444 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h>
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>
using namespace std;
int main(){
int i, j;
string s;
vector<int>list(10, 0);
cin >> s;
for (i = 0; i < s.length(); i++) {
list[s[i] - 48]++;
}
for (i = 9; i >= 0; i--) {
if (list[i] >= 1) {
for (j = 0; j < list[i]; j++) {
cout << i;
}
}
}
cout << endl;
getchar();
getchar();
return 0;
}
aaa