結果
| 問題 |
No.400 鏡
|
| コンテスト | |
| ユーザー |
Kakisuke
|
| 提出日時 | 2019-01-22 19:51:55 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 444 bytes |
| コンパイル時間 | 866 ms |
| コンパイル使用メモリ | 19,840 KB |
| 実行使用メモリ | 11,904 KB |
| 最終ジャッジ日時 | 2024-09-16 04:17:54 |
| 合計ジャッジ時間 | 6,474 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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(s[i]!='\0'){
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