Created
January 15, 2016 13:21
-
-
Save Jack-Saleem/5fdb313fb0ed88685d99 to your computer and use it in GitHub Desktop.
Codeforces 133A HQ9+ program in java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class HQ9 | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner ip = new Scanner(System.in); | |
String s = ip.next(); | |
if(s.contains("H")||s.contains("Q")||s.contains("9")) | |
System.out.println("YES"); | |
else if(s.contains("+")||s.contains("=")) | |
System.out.println("NO"); | |
else | |
System.out.println("NO"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment