MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / main

Function main

lcp06-na-ying-bi.rs:13–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11// 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
12
13fn main() {
14 let coins = vec!(4,2,1);
15 let res = min_count(coins);
16 println!("{:?}", res);
17}
18
19pub fn min_count(coins: Vec<i32>) -> i32 {
20 coins.into_iter().map(|e|e/2+e%2).sum()

Callers

nothing calls this directly

Calls 1

min_countFunction · 0.85

Tested by

no test coverage detected