[BOJ 6843] Anagram Checker

View as PDF

Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 128M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other.

입력 형식

The program should prompt the user for two phrases, each entered on a separate line. You may assume that the input only contains upper case letters and spaces.

출력 형식

The program will print out one of two statements: ”Is an anagram.” or ”Is not an anagram.”

예제 입력

CS AT WATERLOO
COOL AS WET ART

예제 출력

Is an anagram.

Comments

There are no comments at the moment.