結果
| 問題 | No.804 野菜が苦手 |
| コンテスト | |
| ユーザー |
a
|
| 提出日時 | 2019-03-22 23:08:55 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 934 ms |
| コンパイル使用メモリ | 183,652 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-04-07 13:51:34 |
| 合計ジャッジ時間 | 1,632 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 12 |
コンパイルメッセージ
main.cpp: In function 'void solve()':
main.cpp:8:27: warning: 'a' is used uninitialized [-Wuninitialized]
8 | for (int x = 0; x <= a; x++)
| ~~^~~~
main.cpp:7:13: note: 'a' was declared here
7 | int a, b, c, d, ans = 0;
| ^
ソースコード
#include "bits/stdc++.h"
using namespace std;
void solve()
{
int a, b, c, d, ans = 0;
for (int x = 0; x <= a; x++)
{
if (x*c <= b && x*(c+1) <= d)
{
ans = x*(c+1);
}
}
cout << ans << endl;
}
int main(void)
{
solve();
//cout << "yui(*-v・)yui" << endl;
return 0;
}
a