File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
solution/3200-3299/3296.Minimum Number of Seconds to Make Mountain Height Zero Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ public:
185
185
auto check = [ &] (ll t) -> bool {
186
186
ll h = 0;
187
187
for (int& wt : workerTimes) {
188
- h += (ll) (sqrt(t * 2.0 / wt + 0.25) - 0.5);
188
+ h += (long long) (sqrt(t * 2.0 / wt + 0.25) - 0.5);
189
189
}
190
190
return h >= mountainHeight;
191
191
};
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ public:
181
181
auto check = [ &] (ll t) -> bool {
182
182
ll h = 0;
183
183
for (int& wt : workerTimes) {
184
- h += (ll) (sqrt(t * 2.0 / wt + 0.25) - 0.5);
184
+ h += (long long) (sqrt(t * 2.0 / wt + 0.25) - 0.5);
185
185
}
186
186
return h >= mountainHeight;
187
187
};
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Solution {
6
6
auto check = [&](ll t) -> bool {
7
7
ll h = 0 ;
8
8
for (int & wt : workerTimes) {
9
- h += (ll) (sqrt (t * 2.0 / wt + 0.25 ) - 0.5 );
9
+ h += (long long ) (sqrt (t * 2.0 / wt + 0.25 ) - 0.5 );
10
10
}
11
11
return h >= mountainHeight;
12
12
};
You can’t perform that action at this time.
0 commit comments