20240323 Finished

This commit is contained in:
jackfiled 2024-03-23 11:01:30 +08:00
parent 925e9051e2
commit 5e9c813800
2 changed files with 30 additions and 1 deletions

View File

@ -79,3 +79,4 @@ mod p2684_maximum_number_of_moves_in_a_grid;
mod p310_minimum_height_trees; mod p310_minimum_height_trees;
mod p303_range_sum_query_immutable; mod p303_range_sum_query_immutable;
mod p1793_maximum_score_of_a_good_subarray; mod p1793_maximum_score_of_a_good_subarray;
mod p2549_count_distinct_numbers_on_board;

View File

@ -0,0 +1,28 @@
/**
* [2549] Count Distinct Numbers on Board
*/
pub struct Solution {}
// submission codes start here
impl Solution {
pub fn distinct_integers(n: i32) -> i32 {
return if n == 1 {
1
} else {
n - 1
};
}
}
// submission codes end
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_2549() {
}
}