Ah, that threw me off… I kept trying to resubmit my old solution that used to work and I was so confused.
well that was confusing. I did the same as jchen030. tbh I kind of miss the old solution.
Please fix the haskell template … it doesn’t parse the inputs correctly (http://www.codingame.com/forum/t/hostage-rescue-part-1-training-haskell-template-code-bug/396)
EDIT: no full code, see the FAQ
printf("%s", enemy1);
I modified the default code for the ‘onboarding’ game. Every time I run this code it just says ‘Lost!’. I don’t understand if I am doing anything wrong or there is any problem with this code?
What you missed is actually written in default code comments:
doing this in school
how to play this… pls give any tuitorial video link
sir i cannot complete the fist tutorial program i think i didnot understand the question well
could you help me by explaining the question in more elaborated way…
CodinGame planet is being attacked by slimy insectoid aliens.
What language are you trying to use?
There is an error in the standard code for Perl
it automatically chomps the input so when you just return them it doesn’t recognize the names even if they are printed.
Hi, got a little bit stuck. I am new to programming but I feel this might be the best way to learn.
So I have the following code to count the number of ships
while (true) {
int count = in.nextInt(); // The number of current enemy ships within range
in.nextLine();
if (count == 0) { //If the count is zero, restart from while
continue;
}
However it keeps throwing an input mismatch error (for the count) - this is the same code as the one provided for dist1 and dist2. Why is this not working?
I am assuming this code works like this:
Get next integer input from the scanner (system.input) and ‘count’ will have a value of that integer. Any tips on where I;'m going wrong would be sweet. (Using Java)
i want to learn how to play !?!?
Hello guys, i am new member ,i don’t know what i have to do to finish the topic
To finish the topic, you can read the fifty five posts from the beginning.
Instead, you can read again the instructions given on the left of the edit window.
Why can’t I use “strcpy()” or “strlen()” in my solution. This doesn’t make any sense for me, because how else am I going to save the name of the closest bot in my custom variable (“target” for example). I am using C++ if it isn’t clear.
I don’t know C++ but (like in C) these functions are maybe in modules.
i am using c#
I suck in C# but I solved this one even in C# but I searched a long time how to print a string.
Nope, I’m sorry to say but strcpy and strlen are both C way, you can do C in C++ if you include the libraries for strcpy and strlen (#include <cstring> and #include <cunistd>
) but if you’re going to stick with C++, learn a little more about object, with C++ you have the class String
which can hold all kind of strings, add character as simpley as str += "X"
; and for strlen you have a bunch of methods inside the String class including String::length
which is used like str.length
.
If I can give you one advise, that’ll be to learn a little bit of OOP if you stick with C++, else you can do everything you mention in C only.
Can you help me? I’m stuck… c#