From c343dfbd52949afe31c09db72695b34e4cfae412 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Mon, 20 Jan 2025 12:36:25 +0000 Subject: [PATCH] solutions: 133A --- solutions/rust/133A.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 solutions/rust/133A.rs diff --git a/solutions/rust/133A.rs b/solutions/rust/133A.rs new file mode 100644 index 0000000..d2b74cd --- /dev/null +++ b/solutions/rust/133A.rs @@ -0,0 +1,17 @@ +use std::{io, process}; + +fn main() { + let mut s = String::new(); + io::stdin().read_line(&mut s).unwrap(); + + let instructions: [char; 3] = ['H', 'Q', '9']; + let input = s.chars().collect::>(); + + for c in instructions { + if input.contains(&c) { + println!("YES"); + process::exit(0); + } + } + println!("NO"); +}