Little Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercase and lowercase Latin letters. Now Petya wants to compare those two strings lexicographically. The letters' case does not matter, that is an uppercase letter is considered equivalent to the corresponding lowercase letter. Help Petya perform the comparison.
小彼佳喜歡禮物。 他的媽媽給他買了兩根同樣大小的琴弦作為生日禮物。 琴弦由大寫和小寫拉丁字母表示。 現在彼佳想要按字典順序比較這兩根琴弦。 字母的大小寫無關緊要,即一個大寫字母被認為等同於相應的小寫字母。 幫助彼佳進行比較。
Each of the first two lines contains a bought string. The strings' lengths range from 1 to 100 inclusive. It is guaranteed that the strings are of the same length and also consist of uppercase and lowercase Latin letters.
前兩行中的每一行都包含一個購買的琴弦。 代表琴弦的字符串長度範圍從 1 到 100(含)。 保證字符串的長度相同,並且由大寫和小寫拉丁字母組成。
If the first string is less than the second one, print "-1". If the second string is less than the first one, print "1". If the strings are equal, print "0". Note that the letters' case is not taken into consideration when the strings are compared.
如果第一個字符串小於第二個字符串,則打印“-1”。 如果第二個字符串小於第一個字符串,則打印“1”。 如果字符串相等,則打印“0”。 請注意,比較字符串時不考慮字母的大小寫。
aaaa aaaA
0
abs Abz
-1
abcdefg AbCdEfF
1
If you want more formal information about the lexicographical order (also known as the "dictionary order" or "alphabetical order"), you can visit the following site:
如果您想了解更多關於字典順序(也稱為“字典順序”或“字母順序”)的正式信息,您可以訪問以下站點:
ID | User | Problem | Subject | Hit | Post Date |
沒有發現任何「解題報告」 |