Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

RedBlackTrees's blog

By RedBlackTrees, history, 2 months ago, In English

Hello, everyone. In the question cAPS lOCK, the judge said the wrong answer for test case number 3, i.e, 'cAPSlOCK'. Now, from reading the question and the following conditions being given:

"Let's consider that a word has been typed with the Caps lock key accidentally switched on, if:

a) either it only contains uppercase letters; b) or all letters except for the first one are uppercase."

taking the above conditions into consideration, 'cAPSlOCK' should change to 'CapsLock' as apart from 'c' not all the words are lowercase, i.e, 'l'.

My submission number is #123967359 and it can also be found at https://pastebin.com/6EazS8Ph. So, my code converts 'cAPSlOCK' to 'CapsLock', however the desired answer is 'cAPSlOCK'

I highly appreciate anyone's input here.

 
 
 
 
  • Vote: I like it
  • -17
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by RedBlackTrees (previous revision, new revision, compare).

»
2 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

can you send invite to this this gym contest first. When i clicked the link you provided it said i wasnt allowed to view the contest