diff --git a/solutions/rust/705A.rs b/solutions/rust/705A.rs new file mode 100644 index 0000000..0cf98ec --- /dev/null +++ b/solutions/rust/705A.rs @@ -0,0 +1,20 @@ +use std::io; + +fn main() { + let mut s = String::new(); + io::stdin().read_line(&mut s).unwrap(); + + let n = s.trim().parse::().unwrap(); + + let mut words = String::from("I hate"); + + for i in 0..(n-1) { + if i % 2 == 0 { + words += &String::from(" that I love"); + } else { + words += &String::from(" that I hate"); + } + } + + println!("{} it", words); +}