結果
| 問題 |
No.400 鏡
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2016-08-12 15:54:43 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 247 bytes |
| コンパイル時間 | 1,110 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 12:09:20 |
| 合計ジャッジ時間 | 773 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 4 WA * 4 |
コンパイルメッセージ
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);
| ^~~~~~~~~~~~~
ソースコード
#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;
}
Haijinn