CT1855

Ishaan's Ledger of ribbons

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Ishaan inherited the gallery at the foggy moor of Greyfen along with its curious bookkeeping system for ribbons. Time to make sense of it. Task: Compare s and t lexicographically: print -1 if s<t, 0 if s==t, 1 if s>t. Input format: Two lines: string s, then string t. Output format: Print -1, 0, or 1. Constraints: 1 <= |s|,|t| <= 169.

Example 1:

Input: krtuyatyanrzccguugypaplunldqjodvawchkxaxvfgffqsyxpliavtzbzhytrdgjejyhvimzplegiomczoycwkfysixuoeeijmqmgwwrrohtscjtwkulwrowwybrfbrknaigjfoiextiawojlkpxomygnreabr emntrbiqgtxeoiyqumlkmvpxgmgv
Output: 1

Example 2:

Input: dhtjelizbiyskgmdapsdtskhinsinonqqjvrgimozmuvzlyeijwezqogcbsahzmjod demiqhcdgbfnscgeldaidxijkzsktppeewglnayls
Output: 1

Example 3:

Input: bcllexerzdbsjzfawxraxgdaasfuepeyjsxwzryuomnxisvnrqpsjueyuzsykkhcagnuanbstwzwmffxkml mctblgtnegabiqfubphwsddjedbgjaeesbvdapdvbukquibfzahwoyncbkbdckem
Output: -1

Constraints:

1 <= |s|,|t| <= 169.

Loading...
Test Cases:No test cases
No test cases available.
Ishaan's Ledger of ribbons - EASY Coding Problem | CodeTikki