結果
問題 |
No.256 桁の数字を入れ替え (2)
|
ユーザー |
![]() |
提出日時 | 2016-02-25 16:43:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 343 bytes |
コンパイル時間 | 592 ms |
コンパイル使用メモリ | 66,888 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 13:42:13 |
合計ジャッジ時間 | 1,212 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 2 RE * 2 |
ソースコード
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ int d,n; cin >> n; int digit[6] = {}; d = log10(n) + 1; for(int i = 0;i < d;i++){ digit[i] = n % 10; n /= 10; } stable_sort(digit,digit + 6); for(int i = 6;i >= 0;i--) if(digit[i]) cout << digit[i]; cout << endl; }