solutions: 705A

This commit is contained in:
Muhammad Nauman Raza 2025-01-18 00:31:16 +00:00
parent 2b2a80b944
commit 94699362f2
Signed by: devraza
GPG key ID: 91EAD6081011574B

20
solutions/rust/705A.rs Normal file
View file

@ -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::<u64>().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);
}