Skip to content

Commit 78832b3

Browse files
authored
Create Find Minimum Log Transportation Cost.java
1 parent 96489b1 commit 78832b3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution {
2+
public long minCuttingCost(int n, int m, int k) {
3+
long cost = 0;
4+
if (n > k) {
5+
cost += ((long) (n - k)) * (k);
6+
}
7+
if (m > k) {
8+
cost += ((long) (m - k)) * (k);
9+
}
10+
return cost;
11+
}
12+
}

0 commit comments

Comments
 (0)