結果

問題 No.591 (^o^)/
ユーザー cnyankocnyanko
提出日時 2017-11-24 19:56:46
言語 C
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 210 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 27,136 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-05 10:49:43
合計ジャッジ時間 1,944 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:7:12: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    7 |     printf('(');
      |            ^~~
      |            |
      |            int
In file included from main.c:1:
/usr/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:12: warning: multi-character character constant [-Wmultichar]
    8 |     printf('%c',*a);
      |            ^~~~
main.c:8:12: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    8 |     printf('%c',*a);
      |            ^~~~
      |            |
      |            int
/usr/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:9:12: warning: multi-character character constant [-Wmultichar]
    9 |     printf('%c',*b);
      |            ^~~~
main.c:9:12: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    9 |     printf('%c',*b);
      |            ^~~~
      |            |
      |            int
/usr/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:10:12: warning: multi-character character constant [-Wmultichar]
   10 |     printf('%c',*a);
      |            ^~~~
main.c:10:12: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   10 |     printf('%c',*a);
      |            ^~~~
      |            |
      |            int
/usr/include/stdio.h:356:43: note: expected 'const char * 

ソースコード

diff #

#include<stdio.h>

int main(void){
    char *a,*b,out[6];
    *a=getchar();
    *b=getchar();
    printf('(');
    printf('%c',*a);
    printf('%c',*b);
    printf('%c',*a);
    printf(")/\n");

    return 0;
}
0