結果

問題 No.400 鏡
ユーザー HaijinnHaijinn
提出日時 2016-08-12 15:54:43
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 02:34:57
合計ジャッジ時間 742 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 0 ms
5,376 KB
testcase_05 AC 0 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 0 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:7: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
   11 | int p=strlen(s);
      |       ^~~~~~
main.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:11:7: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
   11 | int p=strlen(s);
      |       ^~~~~~
main.c:11:7: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:15:4: warning: implicit declaration of function ‘strchr’ [-Wimplicit-function-declaration]
   15 | if(strchr(s,'>')){
      |    ^~~~~~
main.c:15:4: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
main.c:15:4: warning: incompatible implicit declaration of built-in function ‘strchr’ [-Wbuiltin-declaration-mismatch]
main.c:15:4: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 | scanf("%s",s);
      | ^~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
	
char s[19];
int c=0;
int d=0;

scanf("%s",s);
int p=strlen(s);
int o=strlen(s);
while(!(p==0)){

if(strchr(s,'>')){
	printf("%c",'<');
	p=p-1;
}else if(strchr(s,'<')){
	printf(">");
	p=p-1;
}

}

	return 0;
}
0