We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68a7041 commit 8939602Copy full SHA for 8939602
lcp/LCP 06. 拿硬币/README.md
@@ -116,6 +116,24 @@ function minCount(coins: number[]): number {
116
}
117
```
118
119
+### **PHP**
120
+
121
+```php
122
+class Solution {
123
+ /**
124
+ * @param Integer[] $coins
125
+ * @return Integer
126
+ */
127
+ function minCount($coins) {
128
+ $cnt = 0;
129
+ for ($i = 0; $i < count($coins); $i++) {
130
+ $cnt += floor($coins[$i] / 2) + ($coins[$i] % 2);
131
+ }
132
+ return $cnt;
133
134
+}
135
+```
136
137
### **...**
138
139
lcp/LCP 06. 拿硬币/Solution.php
@@ -0,0 +1,13 @@
1
2
3
4
5
6
7
8
9
10
11
12
13
0 commit comments