feat: 3190_find_minimum_operations_to_make_all_elements_divisible_by_three

This commit is contained in:
SquidSpirit 2025-08-20 02:03:32 +08:00
parent 5428c96ba7
commit 30a13831b7
3 changed files with 20 additions and 0 deletions

View 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"

View File

@ -0,0 +1,6 @@
[package]
name = "find_minimum_operations_to_make_all_elements_divisible_by_three"
version = "0.1.0"
edition = "2024"
[dependencies]

View File

@ -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
}
}