結果
| 問題 | 
                            No.400 鏡
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Kakisuke
                         | 
                    
| 提出日時 | 2019-01-22 19:49:25 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 507 bytes | 
| コンパイル時間 | 828 ms | 
| コンパイル使用メモリ | 19,584 KB | 
| 実行使用メモリ | 15,168 KB | 
| 最終ジャッジ日時 | 2024-09-16 04:17:37 | 
| 合計ジャッジ時間 | 7,305 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | TLE * 1 -- * 3 | 
| other | -- * 8 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%s",s);
      |     ^~~~~~~~~~~~~
            
            ソースコード
#include<stdio.h>
#include<string.h>
#define N 21
int main()
{
    char s[N],cps[N];
    int i,num=0;
    scanf("%s",s);
    i=0;
    while(1){
        if(s[i]=='\0'){
            break;
        }else{
            num++;
        }
        i++;
    }
    for(i=0;i<num;i++){
        cps[num-i]=s[i];
    }
    cps[num+1]='\0';
    i=0;
    while(1){
        if(cps[i]=='<'){
            cps[i]=='>';
        }else{
            cps[i]=='<';
        }
        i++;
    }
    printf("%s\n",cps);
    return 0;
}
            
            
            
        
            
Kakisuke