+ 4
Hidden test case
https://www.sololearn.com/coach/41?ref=app This challenge doesnot show the test cases. It say that the testcase is hidden. I want to know how to open it
12 Answers
+ 1
Good Luck out there misses exclamation mark.
+ 3
All of them show 2 test inputs, and hide 3 more. It is done this way so you cannot use input specific tricks. You cannot see the hidden ones.
+ 2
You can't.
They want you to write the code according to their specifications; if their secret tests fail, you're supposed to figure out the bug with your own tests.
+ 2
Thank. I use cin to input an interger then use if command to compare it with 5 and 10 to get different outputs arcording to the challenge.
I think it is not tricky way when doing that, right ?
+ 1
Well, sometimes there are small problems which we are not aware of.
Do you want to show us your solution so we can take a look?
+ 1
Thank alot for your help. Below is my code. I am learning CPP
#include <iostream>
#include <string>
using namespace std;
int main()
{
int crim;
string help;
cin >> crim;
if(crim <5 && crim >=0){
help ="I got this!";
}
else if(crim >=5 && crim <=10){
help = "Help me Batman";
}
else{
help = "Good Luck out there" ;
}
cout << help;
return 0;
}
0
Thank you very much !. You 're right, i just realized that
0
My code fails to qualify for test cases 3 and 5. I don't think there is any bug in my program. Someone please help !
My code solution for Military Time problem
import java.util.*;
import java.lang.*;
import java.io.*;
class MT
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sp = new Scanner(System.in);
String mt = null;
int i = 0;
String m = sp.nextLine().toLowerCase();
if(m.indexOf(" am")!=-1)
{
if(Integer.parseInt(m.substring(0,m.indexOf(":")))==12)
{
mt ="00"+m.substring(m.indexOf(":"),m.indexOf(" "));
}
else
mt=m.substring(0,m.indexOf(" "));
}
if(m.indexOf(" pm")!=-1)
{
if(Integer.parseInt(m.substring(0,m.indexOf(":")))==12)
mt = m.substring(0,m.indexOf(" "));
else
mt=Integer.toString(Integer.parseInt(m.substring(0,m.indexOf(":")))+12)+m.substring(m.indexOf(":"),m.indexOf(" "));
}
try
{System.out.println(mt);}
catch(Exception e){}
}
}
0
For an algorithm(steps in solving the problem ) to be correct, it must produce the same output for any given input.
If all test cases were shown it will simply make us write the code with respect to the inputs shown not considering other inputs.
0
in decimal to binary conversion test case 4 are hidden so its not showing what i do
0
Yo
only one of my testcase is not passing
help me
#include <iostream>
using namespace std;
int main() {
int ages[5];
for (int i = 0; i < 5; ++i) {
cin >> ages[i];
}
float price;
int i;
float smallest = ages[0];
for (i = 0; i < 4; i++)
{
if (ages[i] < smallest)
{
smallest = ages[i];
}
}
price = 50*(1 - (smallest/100));
cout << price;
return 0;
}
0
n = int(input())
#your code goes here
nums = list(range(5,n,5))
for x in nums:
print(x)
this code run properly but test case 5 shows not right how to solve it