7 970
المشتركون
لا توجد بيانات24 ساعات
لا توجد بيانات7 أيام
لا توجد بيانات30 أيام
أرشيف المشاركات
Maths to
bding3
Raman is a farmer. He wants to buy some pipes of distinct sizes. There were N pipes in the shop and some of them are of the same size. The size of the pipe has been marked on the pipe using some number nums in the form of a bar code. Can you write a program that scans all the bar code and print the number of pipes Raman can get from that shop
Read the input from STDIN and write the output to STDOUT. You should not write arbitrary strings while reading the input and while printing as these contribute to the standard out
Constraints:
0< nums.length <= 310
10 nums[i]< 104
nums is sorted in ascending order.
Input Format:
The frst line of input contains N.
The second line of input contains N pipes separated by a single whie space in ascending order.
Output Format:
The first line of output contains number of pipes after scaning all the bar codes. The second line of output contains pipe sizes after scanning.
Sample Input1:
3
172
Sample Output1:
2
12
Explanation:
From the sample input1, the given number of pipes 3 and the pipe sies are 1,1, and 2. fter scanning all the bar codes first pipe bar code and second pipe bar codes are same So removing one of them Raman got the two pipes of sizes 1 and 2.
ample Input2:
011122334
Previous Question
Next Question
Is there any grp for Accenture? If so can anyone share the grp link with me please
Hi Kausish Welcome to this Community, Subscribe Our YouTube Channel📣 for Daily Jobs Updates and Study Material
Hi 上官睿酣 Join Our Channel for daily Off-Campus Job Updates ❤️
👇👇
@offcampusjobs_0
@offcampusjobs_0
Hi Benone Join Our Channel for daily Off-Campus Job Updates ❤️
👇👇
@offcampusjobs_0
@offcampusjobs_0
Hi Akanksha Join Our Channel for daily Off-Campus Job Updates ❤️
👇👇
@offcampusjobs_0
@offcampusjobs_0
Hi Peter Join Our Channel for daily Off-Campus Job Updates ❤️
👇👇
@offcampusjobs_0
@offcampusjobs_0
