結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー mmn15277198mmn15277198
提出日時 2021-02-10 00:17:26
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 2,878 bytes
コンパイル時間 1,004 ms
コンパイル使用メモリ 104,300 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-21 11:46:57
合計ジャッジ時間 1,476 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 5 ms
4,376 KB
testcase_03 AC 5 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//#include <bits/stdc++>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int , int> pair_ii;
typedef pair<ll , ll> pair_ll;

#define rep(i , x , n) for(int (i) = (x); i < (n); i++)
#define rrep(i , n , x) for(int (i) = (n); i >= (x); i--)

const int mod = 1000000007;
const int INF = 100100100;
const double pi = 3.14159265358979;

//vector<int> ans;
//set<ll> ans;
//vector<int> table(20010 , 0);
//vector<int> dp(n + 10 , 0);
//vector<vector<int>> dp(n + 10 , vector<int>(2 , 0));

ll gcd(ll a , ll b){if(a < b)swap(a , b);if(a % b == 0)return b;else return gcd(b , a % b);}
ll lcm(ll a , ll b){return a / gcd(a , b) * b;}
bool chmax(ll &a , ll &b){if(a < b){a = b;return true;}else{return false;}}
bool chmin(ll &a , ll &b){if(a > b){a = b;return true;}else{return false;}}

bool is_prime(ll n){
	if(n == 2 || n == 3 || n == 5 || n == 7)return true;
	for(int i = 2; i * i <= n; i++){if(n % i == 0)return false;}
	return true;
}

void prime_fact(ll n){
	vector<int> ans;ll x = n;
	for(int i = 2; i * i <= n; i++){while(x % i == 0){ans.push_back(i);x /= i;}}
	if(x > 1)ans.push_back(x);
}

void divisor(ll n){
    set<ll> ans;
    rep(i , 1 , sqrt(n) + 10){if(n % i == 0)ans.insert(i);if(i != (n / i))ans.insert(n / i);}
}

void solve(){
    string s;
    cin >> s;
    sort(s.rbegin() , s.rend());
    cout << s << endl;
}

int main(){
	//cout << fixed << setprecision(20) << endl;
	cin.tie(0);
	ios::sync_with_stdio(false);
	//int t;cin >> t;for(int i = 0; i < t; i++)
	solve();
    return 0;
}
0