DCP-312: Replace HIS name Back to All Problems

Beginner Beginners Problems > Ad-hoc

One of my best friend's name is **Sharif**. As he is a very special person, we call him **Officer**. One day he told us that he wants to name himself **Officer**. But to do this, he is facing some problems. There are lot of files in his desktop where wrote his name so many times and he wants to replace them all. Now he wants your help to write a program that will replace his name **Sharif** by **Officer**. Can you help him? ***Note: He does not replace word "Sharif" concatenated with other English alphabets.*** **So, He replace word of following format: [ not alphabet ]Sharif[ not alphabet ]** Input: ------ Input starts with an integer **T (1<=20)**, denoting the number of test cases. Each case contains a string with length less than **1000**. The characters in the string may be any ascii characters. Consider that his name always starts with capital letter and others are in small letters. Output: ------- For each case of input, print **“Case X: Y”** (without quotes) where **X** is the number of test case (start from 1). And **Y** will be the string of replaced name Sample Input ------------ 3 My name is Sharif. Sharif is a great mathematician. ijija sad foiasd jasSharif jaksjd f. Sample Output ------------- Case 1: My name is Officer. Case 2: Officer is a great mathematician. Case 3: ijija sad foiasd jasSharif jaksjd f.

Problem Setter:

(Account Deleted)

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C 1.00
C++ 1.00
C++14 1.00
C# 2.00
Go 2.00
Java 2.00
JavaScript 2.00
Objective-C 2.00
Perl 2.00
PHP 2.00
Python 2.00
Python3 2.00
Ruby 2.00
VB.Net 2.00

Problem Stats




# User Language Timing
01 habib_rahman Cpp14 0.00s
02 adnanSharif Cpp14 0.00s
03 anowar1112 Cpp14 0.00s
04 shailyroy Cpp14 0.00s
05 nuhu_iu Cpp14 0.00s
06 duronto20 Cpp14 0.00s
07 ArifKhanShubro Cpp14 0.00s
08 MI47 Cpp14 0.00s
09 subhashis_cse Cpp14 0.00s
10 aseem_cu Cpp14 0.00s
11 rajdipsaha Cpp14 0.00s
12 Trusted_Frustrated Cpp14 0.00s
13 haasib Cpp14 0.00s
14 emrul Cpp14 0.00s
15 tariqiitju Cpp 0.00s
16 sazal_dev Cpp14 0.00s
17 7Mahfuz Cpp14 0.00s
18 Najat Cpp14 0.00s
19 arabin C 0.00s
20 shamimjucse Cpp14 0.00s
21 MAD_coder Cpp14 0.00s
22 MamunAmin Cpp14 0.00s
23 lazyfahim Cpp14 0.00s
24 saiful130104 Cpp14 0.00s
25 MRITuhin Cpp14 0.00s
26 Dragon_Curve Cpp14 0.00s
27 rayhan50001 Cpp14 0.00s
28 Mohaimin66 Cpp14 0.00s
29 yasirnabil534 Cpp14 0.00s
30 pulak_ict_mbstu Cpp14 0.00s
31 mohibur Cpp14 0.00s
32 sohag_AUST Cpp14 0.00s
33 mahbub07 Cpp14 0.00s
34 maxhasan Cpp14 0.00s
35 akram Cpp14 0.00s
36 motaleb_ICT Cpp14 0.00s
37 onucsecu Cpp14 0.00s
38 Sarwar05 Cpp14 0.00s
39 mrinmoi Cpp14 0.00s
40 shahedjamil108 Cpp14 0.00s
41 _GhOstMan_ Cpp14 0.00s
42 Sleep_Mode Cpp14 0.00s
43 nafiamahjabin Cpp14 0.00s
44 feodorv Cpp14 0.00s
45 anik_JU Cpp14 0.00s
46 miltonbhowmick Cpp14 0.00s
47 Mr_KAJOL Cpp14 0.00s
48 AlaminJust Cpp14 0.00s
49 imAnik Cpp14 0.00s
50 Ansarul_14 Cpp 0.00s

Your feedback is our precious!

Or call +88 02 9853138 for support