From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/int_roman.rs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 other/int_roman.rs (limited to 'other/int_roman.rs') diff --git a/other/int_roman.rs b/other/int_roman.rs deleted file mode 100644 index 9e8aa9e..0000000 --- a/other/int_roman.rs +++ /dev/null @@ -1,26 +0,0 @@ -struct Solution; - -impl Solution { - pub fn int_to_roman(num: i32) -> String { - let (mut ans, mut curr) = ("".to_owned(), num); - let val_sym: Vec<(i32, &str)> = vec![ - (1000, "M"), (900, "CM"), (500, "D"), - (400, "CD"), (100, "C"), (90, "XC"), - (50, "L"), (40, "XL"), (10, "X"), - (9, "IX"), (5, "V"), (4, "IV"), (1, "I") - ]; - for &(v, s) in val_sym.iter() { - let count = curr / v; - if count > 0 { - let mult_str = s.repeat(count as usize); - ans.push_str(&mult_str); - curr %= v; - } - } - ans - } -} - -fn main() { - print!("{}", Solution::int_to_roman(1994)); -} -- cgit v1.2.3