1 条题解
- 
  0
C++ :
#include <bits/stdc++.h> using namespace std; int main(){ int n,x,a[100],i; cin>>n; for(i = 0;i < n;i++){ cin>>a[i]; } sort(a,a+n); for(i = n - 1;i >= 0;i--){ cout<<a[i]; } }Python :
class Node: def __init__(self,id): self.id=id def __lt__(self,other): if str(self.id)+str(other.id)>str(other.id)+str(self.id): return True n=int(input()) s=list(map(int,input().split())) lst=list() s.sort(reverse=True) for item in s: lst.append(Node(item)) lst.sort() for item in lst: print(item.id,end="") 
- 1
 
信息
- ID
 - 2371
 - 时间
 - 1000ms
 - 内存
 - 32MiB
 - 难度
 - 4
 - 标签
 - 递交数
 - 154
 - 已通过
 - 73
 - 上传者