結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
zishuzemi3215
|
| 提出日時 | 2018-04-04 13:34:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 23,936 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 08:49:19 |
| 合計ジャッジ時間 | 639 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%c%c%c", &a,&b,&c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<cstdio>
#include<cstdlib>
int main(void) {
char a, b, c;
int A, B, C;
scanf("%c%c%c", &a,&b,&c);
if (a == '?') {
B = atoi(&b);
C = atoi(&c);
if ((1 - B)*(C - B) > 0) { printf("1"); }
else { printf("4"); }
}
else if (b == '?') {
printf("14");
}
else if (c == '?') {
A = atoi(&a);
B = atoi(&b);
if ((1 - B)*(A - B) > 0) { printf("1"); }
else { printf("4"); }
}
printf("\n");
return 0;
}
zishuzemi3215