結果
| 問題 | 
                            No.256 桁の数字を入れ替え (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             funakoshi
                         | 
                    
| 提出日時 | 2019-08-26 15:58:14 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 469 bytes | 
| コンパイル時間 | 144 ms | 
| コンパイル使用メモリ | 30,080 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-07 18:59:27 | 
| 合計ジャッジ時間 | 932 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 2 RE * 2 | 
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
    char num[1000]="";
    char max[1000]="";
    scanf("%s",num);
    for(int i=0;i<strlen(num)-1;i++)
    {
        for(int j=i+1;j<strlen(num);j++)
        {
            char tmp=num[i];
            num[i]=num[j];
            num[j]=tmp;
            if(strcmp(num,max)>0)
            {
                strcpy(max,num);
            }
        }
    }
}
            
            
            
        
            
funakoshi