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:
185185 auto check = [ &] (ll t) -> bool {
186186 ll h = 0;
187187 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);
189189 }
190190 return h >= mountainHeight;
191191 };
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ public:
181181 auto check = [ &] (ll t) -> bool {
182182 ll h = 0;
183183 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);
185185 }
186186 return h >= mountainHeight;
187187 };
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Solution {
66 auto check = [&](ll t) -> bool {
77 ll h = 0 ;
88 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 );
1010 }
1111 return h >= mountainHeight;
1212 };
You can’t perform that action at this time.
0 commit comments