結果
問題 | No.256 桁の数字を入れ替え (2) |
ユーザー |
![]() |
提出日時 | 2015-10-02 13:23:33 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 438 bytes |
コンパイル時間 | 589 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-19 19:07:12 |
合計ジャッジ時間 | 788 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <stdio.h>#include <string.h>int main(void){int i, j, n, cnt = 0, num[10] = {0};while(1){n = getchar();cnt++;if(n=='\n') break;n -= '0';num[n]++;}for(i=0;i<cnt;i++){for(j=9;j>=0;j--){if(num[j]){printf("%d", j);num[j]--;break;}}}printf("\n");return 0;}