結果
| 問題 | 
                            No.256 桁の数字を入れ替え (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Haijinn
                         | 
                    
| 提出日時 | 2017-03-31 20:58:15 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 434 bytes | 
| コンパイル時間 | 203 ms | 
| コンパイル使用メモリ | 21,632 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-07 04:47:39 | 
| 合計ジャッジ時間 | 864 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 RE * 2 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:14:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 | scanf("%s",s);
      | ^~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void)
{
int n;
int h;
int m;
int t;
int q;
int z;
int temp;
char s[100];
scanf("%s",s);
for(h=0;h<strlen(s);h++){
	
	for(m=strlen(s)-1;m>h;m--){
		
		if(s[m]<s[m-1]){
			temp=s[m-1];
			s[m-1]=s[m];
			s[m]=temp;
			
			
			
			
			
			
		}
		
		
		
		
		
		
		
	}
	
	
	
	
	
	
	
	
}
for(h=strlen(s)-1;h>=0;h--){
	
	printf("%c",s[h]);
	
	
}
printf("\n");
	return 0;
}
            
            
            
        
            
Haijinn