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 anikatahsin Cpp14 0.00s
02 The_Viper Cpp14 0.00s
03 sohag_AUST Cpp14 0.00s
04 motaleb_ICT Cpp14 0.00s
05 Aman_khan Cpp14 0.00s
06 ShahiPapon Cpp14 0.00s
07 Najat Cpp14 0.00s
08 showmic Cpp14 0.00s
09 omaer1510033 Cpp14 0.00s
10 Dinar Cpp14 0.00s
11 Rahmatullah Cpp14 0.00s
12 absa1am Cpp14 0.00s
13 md_muntaz Cpp14 0.00s
14 ash12 Cpp14 0.00s
15 iftekher2283 Cpp14 0.00s
16 jayed_al_hasan Cpp14 0.00s
17 Mehedi07 Cpp14 0.00s
18 terminator_c Cpp14 0.00s
19 maxhasan Cpp14 0.00s
20 gulzar Cpp14 0.00s
21 SkSaber Cpp14 0.00s
22 sadia2427 Cpp14 0.00s
23 Logic_Hunter Cpp14 0.00s
24 JubayerSohel Cpp14 0.00s
25 Nazmul0092 Cpp14 0.00s
26 Alice_2 Cpp14 0.00s
27 deder Cpp14 0.00s
28 HM39 Cpp14 0.00s
29 Khayrul_34 Cpp14 0.00s
30 gsshanto Cpp14 0.00s
31 Core_i14 Cpp14 0.00s
32 hmtanbir Cpp14 0.00s
33 Mr_KAJOL Cpp14 0.00s
34 deptapaul Cpp14 0.00s
35 smriad Cpp14 0.00s
36 SakibAlamin Cpp14 0.00s
37 Koushik54 Cpp14 0.00s
38 Nusrat_cse16 Cpp14 0.00s
39 mrinmoi Cpp14 0.00s
40 Anika_Bushra Cpp14 0.00s
41 junayedmahmud Cpp14 0.00s
42 opu1604073 Cpp14 0.00s
43 raptor Cpp14 0.00s
44 noyonhossen Cpp14 0.00s
45 shibli1604128 Cpp14 0.00s
46 Nasif Cpp14 0.00s
47 rabeya1604127 Cpp14 0.00s
48 Mahadi_Hasan Cpp14 0.00s
49 Alamgir_1604069 Cpp14 0.00s
50 Mahadi024 Cpp14 0.00s

Your feedback is our precious!

Or call +88 02 9853138 for support