From aa2729e377ad0230b8779a14fba6adba79503d50 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 18 Jan 2025 20:03:03 +0000 Subject: [PATCH] solutions: 339A --- solutions/rust/339A.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 solutions/rust/339A.rs 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("+")); +}