Musk Colonizing Mars

Elon Musk often asks a question “Do you think I’m insane?”. We don’t know right? But we all know tha…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

There is some problem in the test cases.
for languages like python of bash, any attempt to solve the problem will fail.
unless it is done forced, like me.

The problem is, in the sample case, the inputs are separated in 3 lines.
but in the test cases, they might not be.
I think, there is unnecessary space or something like that.
@hjr265

1 Like

This code fails but this works, The test cases might be broken.

a = int(input())
b = int(input())
c = int(input())
print(c*(a+b))
from sys import stdin
s = ""
for i in stdin:
    s += i
a, b, c = map(int, s.split())
print(c*(a+b))

Note: for both submission, The sample test case was OK.

Thank you, @touhidur!

There were some inconsistencies across different test I/Os. We have redone the files to make sure that they are in a more predictable format. Future solvers should not face any issue like this for this problem.

1 Like

Thanks!! @hjr265

Actually, I was attempting to solve my first problem in Bash.
However, this problem occurred.
But thanks to you I have successfully solved my first problem in Bash here.

read a b c
echo $((c*a+c*b))

re: I have just found that markups don’t work for Bash in Toph.
The solution link which I have provided has only black letters.

bash

1 Like

Thank you again, @touhidur!

Bash syntax highlighting should now work as expected.

1 Like

WoW! So, quick!!! I am astonished!!!