DCP-194: Number Formatting Back to All Problems

Beginner Beginners Problems > Ad-hoc

In a bulk SMS platform you can send hundreds and thousands of SMS in a very easy and cost effective way. There are many such SMS service provider around the world. One common task these SMS service providers have to do is to format the mobile numbers and figure out in which mobile operator these numbers belongs to, so that the SMS can be delivered through proper channel and can be applied proper pricing. In this problem you have to carry out a similar real life task. We will consider the follow mobile operators of Bangladesh (Operator code number is given alongside). If the mobile number do not contain country code (i.e. 88) then you have to add the country code. You also have to maintain the order the number comes in input. Citycell - 011 Teletalk - 015 Airtel - 016 Grameenphone - 017 Robi - 018 Banglalink - 019 Input: ------ Input starts with an integer **T (1<=50)**, denoting the number of test cases. Each case contains a mobile number **N** in a line with or without country code. Output: ------- For each case of input, output the formatted mobile number by adding country code if necessary and then print the mobile operator name separated by a space. Please check sample input/output for better understanding of format. Sample Input ------------ 3 01672994777 8801794061678 8801159213388 Sample Output ------------- 8801672994777 Airtel 8801794061678 Grameenphone 8801159213388 Citycell

Problem Setter:

MD. Jalal Uddin

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 ash12 Cpp14 0.00s
02 iftekher2283 Cpp14 0.00s
03 absa1am Cpp14 0.00s
04 Core_i14 Cpp14 0.00s
05 Saimum_140128 Cpp14 0.00s
06 anikatahsin Cpp14 0.00s
07 Nazmul_WUB Cpp14 0.00s
08 rabel Cpp 0.00s
09 showmic Cpp14 0.00s
10 sherina Cpp 0.00s
11 Najat Cpp14 0.00s
12 maxhasan Cpp14 0.00s
13 gazi93 Cpp 0.00s
14 shishir09 Cpp14 0.00s
15 shafayet_hossain Cpp 0.00s
16 The_Viper Cpp14 0.00s
17 Aman_khan Cpp14 0.00s
18 deder Cpp14 0.00s
19 wizard Cpp 0.00s
20 Dinar Cpp14 0.00s
21 non_coder C 0.00s
22 Logic_Hunter Cpp14 0.00s
23 SkSaber Cpp14 0.00s
24 sohag_AUST Cpp14 0.00s
25 ShahiPapon Cpp14 0.00s
26 motaleb_ICT Cpp14 0.00s
27 mrinmoi Cpp14 0.00s
28 junayedmahmud Cpp14 0.00s
29 deptapaul Cpp14 0.00s
30 feodorv Cpp14 0.00s
31 Mr_KAJOL Cpp14 0.00s
32 neel71 Cpp 0.00s
33 leenaiitju C 0.00s
34 gulzar Cpp14 0.00s
35 md_muntaz Cpp14 0.00s
36 JubayerSohel Cpp14 0.00s
37 Mehedi07 Cpp14 0.00s
38 omaer1510033 Cpp14 0.00s
39 Rahmatullah Cpp14 0.00s
40 MarufAhmed Cpp 0.00s
41 Rakib05 C 0.00s
42 terminator_c Cpp14 0.00s
43 Dilshad_Dolon Cpp14 0.00s
44 Ashish972 Cpp14 0.00s
45 Alice_2 Cpp14 0.00s
46 jayed_al_hasan Cpp14 0.00s
47 DynamicOvi Cpp 0.00s
48 HM39 Cpp14 0.00s
49 gsshanto Cpp14 0.00s
50 Koushik54 Cpp14 0.00s

Your feedback is our precious!

Or call +88 02 9853138 for support