feat: 3190_find_minimum_operations_to_make_all_elements_divisible_by_three
This commit is contained in:
parent
5428c96ba7
commit
30a13831b7
7
3190_find_minimum_operations_to_make_all_elements_divisible_by_three/Cargo.lock
generated
Normal file
7
3190_find_minimum_operations_to_make_all_elements_divisible_by_three/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "find_minimum_operations_to_make_all_elements_divisible_by_three"
|
||||
version = "0.1.0"
|
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "find_minimum_operations_to_make_all_elements_divisible_by_three"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
@ -0,0 +1,7 @@
|
||||
pub struct Solution;
|
||||
|
||||
impl Solution {
|
||||
pub fn minimum_operations(nums: Vec<i32>) -> i32 {
|
||||
nums.iter().filter(|&num| num % 3 != 0).count() as i32
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user