結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー motimoti
提出日時 2015-11-16 18:50:48
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 1,171 ms
コンパイル使用メモリ 148,008 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-11 16:49:30
合計ジャッジ時間 1,646 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main() {
string s; cin >> s;
sort(s.begin(), s.end());
int zcnt = 0;
for(int i=0;i<s.size();i++) {
if(s[i] == '0') {
zcnt++;
}
else {
for(int i=0;i<zcnt;i++) cout << 0;
for(int i=zcnt;i<s.size();i++)cout <<s[i];
cout << endl;
exit(0);
}
}
return 0;
}
0