solutions: 133A
This commit is contained in:
parent
e5b5366785
commit
c343dfbd52
1 changed files with 17 additions and 0 deletions
17
solutions/rust/133A.rs
Normal file
17
solutions/rust/133A.rs
Normal file
|
@ -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::<Vec<char>>();
|
||||||
|
|
||||||
|
for c in instructions {
|
||||||
|
if input.contains(&c) {
|
||||||
|
println!("YES");
|
||||||
|
process::exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println!("NO");
|
||||||
|
}
|
Loading…
Reference in a new issue