Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150034 李鸣 重组最大数 C++ Wrong Answer 1 MS 272 KB 460 2026-03-21 16:38:11

Tests(1/10):


Code:

#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { long long n; cin >> n; vector<int> digits; // 拆分每一位数字 while (n > 0) { digits.push_back(n % 10); n /= 10; } // 从大到小排序 sort(digits.rbegin(), digits.rend()); // 输出结果 for (int d : digits) { cout << d; } cout << endl; return 0; }


Run Info:

------Input------
0
------Answer-----
0
------Your output-----