結果

問題 No.400 鏡
ユーザー nxterunxteru
提出日時 2017-03-26 14:11:40
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 108 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 26,704 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-20 11:00:25
合計ジャッジ時間 980 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘main’ 内:
main.c:3:15: 警告: 関数 ‘strlen’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    3 | for(int i=0;i<strlen(a);i++){
      |               ^~~~~~
main.c:1:1: 備考: include ‘<string.h>’ or provide a declaration of ‘strlen’
  +++ |+#include <string.h>
    1 | int main(void){
main.c:3:15: 警告: 組み込み関数 ‘strlen’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
    3 | for(int i=0;i<strlen(a);i++){
      |               ^~~~~~
main.c:3:15: 備考: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:4:4: 警告: 関数 ‘getchar’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    4 |    getchar()=='>'?printf("<"):printf(">");
      |    ^~~~~~~
main.c:1:1: 備考: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:19: 警告: 関数 ‘printf’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    4 |    getchar()=='>'?printf("<"):printf(">");
      |                   ^~~~~~
main.c:4:19: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:4:19: 警告: 組み込み関数 ‘printf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
main.c:4:19: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

int main(void){
    char a[21];
for(int i=0;i<strlen(a);i++){
   getchar()=='>'?printf("<"):printf(">");
}
}
0