blob: 0bead970043a47d8b76a3c6bab19f9d12f704942 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
struct Solution;
impl Solution {
pub fn maximum69_number(num: i32) -> i32 {
num.to_string().replacen("6", "9", 1).parse().unwrap()
}
}
fn main() {
print!("{}", Solution::maximum69_number(9669));
}
|