| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138556 | hjx2111111 | 分割排序 | C++ | Accepted | 1 MS | 284 KB | 646 | 2025-11-27 18:06:10 |
#include <bits/stdc++.h> using namespace std; int main() { int d,f,i,j,k,n,s,e[1000]; char a[1000],b[1000][20]; i=0; while (scanf("%s",a)!=EOF) { i=j=k=0; f=1; while (i<strlen(a)) { while (a[i]!='5' and i!=strlen(a)) { b[k][j++]=a[i]; f=f*10; i++; } if (j>0) { b[k][j]='\0'; f=f/10; d=s=0; while (d<j) { s=s+(b[k][d]-48)*f; f=f/10; d++; } e[k]=s; k++; } f=1; j=0; i++; } sort(e,e+k); i=0; while (i<k) printf("%d ",e[i++]); printf("\n"); } return 0; }