| 7 | import java.util.regex.*; |
| 8 | |
| 9 | public class Pangrams { |
| 10 | |
| 11 | // Complete the pangrams function below. |
| 12 | static String pangrams(String s) { |
| 13 | s = s.toLowerCase(); |
| 14 | HashSet<Character> h = new HashSet<Character>(); |
| 15 | for(int i=0;i<s.length();i++){ |
| 16 | if(Character.isLetter(s.charAt(i))) { |
| 17 | h.add(s.charAt(i)); |
| 18 | } |
| 19 | } |
| 20 | if(h.size() == 26){ |
| 21 | return "pangram"; |
| 22 | } |
| 23 | return "not pangram"; |
| 24 | |
| 25 | } |
| 26 | private static final Scanner scanner = new Scanner(System.in); |
| 27 | |
| 28 | public static void main(String[] args) throws IOException { |
| 29 | BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH"))); |
| 30 | |
| 31 | String s = scanner.nextLine(); |
| 32 | |
| 33 | String result = pangrams(s); |
| 34 | |
| 35 | bufferedWriter.write(result); |
| 36 | bufferedWriter.newLine(); |
| 37 | |
| 38 | bufferedWriter.close(); |
| 39 | |
| 40 | scanner.close(); |
| 41 | } |
| 42 | } |
nothing calls this directly
no outgoing calls
no test coverage detected