+ 1

How can we take input in single string with multiple integral values separated by space?

11th Mar 2020, 4:28 PM
Pankaj Kumar
Pankaj Kumar - avatar
6 ответов
+ 1
Can you show me your code? have you tried to code it yet? An example of string input perhaps?
11th Mar 2020, 4:33 PM
Ipang
+ 1
I tried it in python and i want to implement it here.
11th Mar 2020, 4:36 PM
Pankaj Kumar
Pankaj Kumar - avatar
+ 1
Well, good job! 👍 But I saw your comment in the previous thread, you said you'd like to make it a shorter code. But the real truth is, it's hard to make C/C++ code shorter than one written in Python (for same purpose) 😂 So good luck! maybe someone can help with that idea 👍
11th Mar 2020, 4:55 PM
Ipang
0
Share the python code bro!
11th Mar 2020, 4:38 PM
Ipang
0
I just noticed you posted this topic twice. Why not wait for other responders in the previous thread? the responder in that thread had given a link which is relevant. https://www.sololearn.com/Discuss/2196925/?ref=app
11th Mar 2020, 4:43 PM
Ipang
0
for i in range(int(input())): n=int(input()) a=list(map(int,input().split())) count=1 for j in range (n): count=max(count,a.count(a[j])) print(n-count)
11th Mar 2020, 4:49 PM
Pankaj Kumar
Pankaj Kumar - avatar