結果
| 問題 |
No.591 (^o^)/
|
| コンテスト | |
| ユーザー |
cnyanko1
|
| 提出日時 | 2017-11-23 17:11:12 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 140 bytes |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 21,504 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 05:37:22 |
| 合計ジャッジ時間 | 589 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:15: warning: format ‘%c’ expects argument of type ‘int’, but argument 2 has type ‘char*’ [-Wformat=]
8 | printf("(%c%c%c)\\n",a,b,a);
| ~^ ~
| | |
| int char*
| %s
main.cpp:8:17: warning: format ‘%c’ expects argument of type ‘int’, but argument 3 has type ‘char*’ [-Wformat=]
8 | printf("(%c%c%c)\\n",a,b,a);
| ~^ ~
| | |
| int char*
| %s
main.cpp:8:19: warning: format ‘%c’ expects argument of type ‘int’, but argument 4 has type ‘char*’ [-Wformat=]
8 | printf("(%c%c%c)\\n",a,b,a);
| ~^ ~
| | |
| int char*
| %s
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%c",a);
| ~~~~~^~~~~~~~
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%c",b);
| ~~~~~^~~~~~~~
main.cpp:5:10: warning: ‘a’ is used uninitialized [-Wuninitialized]
5 | scanf("%c",a);
| ~~~~~^~~~~~~~
main.cpp:6:10: warning: ‘b’ is used uninitialized [-Wuninitialized]
6 | scanf("%c",b);
| ~~~~~^~~~~~~~
ソースコード
#include<stdio.h>
int main (void){
char * a,*b;
scanf("%c",a);
scanf("%c",b);
printf("(%c%c%c)\\n",a,b,a);
return 0;
}
cnyanko1