Submission #1735762
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define ll long long int main() { ll n, h, a, b, c, d, e; cin >> n >> h >> a >> b >> c >> d >> e; ll m_min = 1e15; for (ll x = 0; x <= n; x++) { ll t = ( (n - x)*e - h - b*x d + e - 1) / (d + e); m_min = min(m_min, t); } printf("%lld\n", m_min); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 節制 |
User | nomi |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 426 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:13:38: error: expected ‘)’ before ‘d’ ll t = ( (n - x)*e - h - b*x d + e - 1) / (d + e); ^