diff --git a/solutions/rust/339A.rs b/solutions/rust/339A.rs new file mode 100644 index 0000000..fa82e83 --- /dev/null +++ b/solutions/rust/339A.rs @@ -0,0 +1,12 @@ +use std::io; + +fn main() { + let mut s = String::new(); + io::stdin().read_line(&mut s).unwrap(); + + let mut nums = s.trim().split('+').map(|d| String::from(d)).collect::>(); + + nums.sort(); + + println!("{}", nums.join("+")); +}