結果
問題 |
No.2138 Add Bacon
|
ユーザー |
![]() |
提出日時 | 2022-12-01 07:44:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 185 bytes |
コンパイル時間 | 1,916 ms |
コンパイル使用メモリ | 191,820 KB |
最終ジャッジ日時 | 2025-02-09 03:01:09 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: 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); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#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); printf("%d\n", d > e ? a - b + c * (d - e) : a - b); }