結果
| 問題 |
No.2138 Add Bacon
|
| コンテスト | |
| ユーザー |
Forested
|
| 提出日時 | 2022-12-01 07:40:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 235 bytes |
| コンパイル時間 | 2,820 ms |
| コンパイル使用メモリ | 190,832 KB |
| 最終ジャッジ日時 | 2025-02-09 03:01:00 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:13: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~^ ~
| | |
| int* int
main.cpp:5:15: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘int’ [-Wformat=]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~^ ~
| | |
| int* int
main.cpp:5:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘int’ [-Wformat=]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~^ ~
| | |
| int* int
main.cpp:5:19: warning: format ‘%d’ expects argument of type ‘int*’, but argument 5 has type ‘int’ [-Wformat=]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~^ ~
| | |
| int* int
main.cpp:5:21: warning: format ‘%d’ expects argument of type ‘int*’, but argument 6 has type ‘int’ [-Wformat=]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~^ ~
| | |
| int* int
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:5:10: warning: ‘a’ is used uninitialized [-Wuninitialized]
5 | scanf("%d%d%d%d%d", a, b, c, d, e);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:4:9: note: ‘a’ was declared here
4 | int a, b, c, d, e;
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e;
scanf("%d%d%d%d%d", a, b, c, d, e);
if (d > e) {
printf("%d\n", a - b + c * (d - e));
} else {
printf("%d\n", a - b);
}
}
Forested