Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Remi,validated by @FredericLocquet,@Timinator and @McKael.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Remi,validated by @FredericLocquet,@Timinator and @McKael.
If you have any issues, feel free to ping them.
hi
could someone explain the rule pls�
Itâs Space invaders.
could you explain the rules
for example task 03
last two dots meaning no plane we should to wait 2 turn -ok
but at the begining of the string we have 4 dots - but only 1 wait. how?!
Hi, I hope this will help you.
Initial state :
...<<<<<<<<<<<<<<<<<<<<<<<..<<<
^______________________________
First turn : you wait
..<<<<<<<<<<<<<<<<<<<<<<<..<<<.
^______________________________
2nd turn : shoot
.<<<<<<<<<<<<<<<<<<<<<<<..<<<..
|______________________________
3rd turn
X<<<<<<<<<<<<<<<<<<<<<<..<<<...
^______________________________
thank you.
so in the description is incorrect ( little bit )
âEach turn your missiles move one cell up.â
as I understand when missile already in air then one cell up for one turn
but launching the missile is occupies 2 turn
[first turn arrow ^ just replacing by |]
[second turn its movies to one cell up]
ok. what is happening with missile when its meet plane ? is it goes to next line (up) ?
Thatâs why I wrote âNote: When you shoot, the missile appears at the same altitude as the launcherâ.
But maybe you can tell me what I can write if it is not clear enough ?
The missile disappears but there is no case where you need the missile to shoot another aircraft (no need to shoot twice at the same turn).
it will be best if launching the missile and fly of missile will be identical (1 turn - 1 line) but might be this is unreal
then I think is need to describe more detailed this situation with launching and maybe provide some exampleâŠ
That was fun.
Thank you
could someone explain to me how planes behave when they exit the screen. Since level 2 is impossible in 1 pass since all 3 planes stack over each other and you cant shoot 3 missiles at once
do they come back from the same side they came or do they turn around
âŠ>⊠âŠ>. âŠ> âŠ< âŠ<⊠âŠ<âŠ
Actually this case never appears, you can shoot each plane before it reaches the other side.
Hi, my solution passes all the test cases, but when I submit I fail the âHold the line caseâ. Iâm not sure how it differs from the corresponding test case, but it seems to be an edge case for my solution and I canât figure out why.
In the validator the launcher is on the right of the grid (instead of the left in the test case).
You can try this custom test case :
2
>.>..
____^
Output : SHOOT WAIT SHOOT
Thanks, it seems the problem occurs when the gun is in the rightmost position.
Hi,
Your puzzle seems cool but I have an issue to print the value âWAITâ (it works with âSHOOTâ).
I tried with different languages (Dart and after Javascript) and I have the same issue.
For example with this code (itâs the default one with the line console.log('SHOOT')
commented) :
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
const n = parseInt(readline());
for (let i = 0; i < n; i++) {
const line = readline();
}
// Write an answer using console.log()
// To debug: console.error('Debug messages...');
//console.log('SHOOT');
console.log('WAIT');
I have the result "Failed. Found: nothing, Expected: âWAITâ ".
Do you have any idea of the problem ? Thanks !
Hi, you have to output several lines, until you shoot every aircraft. Your first line is WAIT but your 2nd line is nothing because you donât output a second line.
Hello,
I have a little problem with my PHP output, everything is fine, I get the correct firing instructions, but there is a formatting error.
Sortie console
Sortie standard :
array (
0 => '....................',
1 => '.>..................',
2 => '...................<',
3 => '....................',
4 => '....................',
5 => '_________^__________',
)
WAIT
WAIT
WAIT
SHOOT
WAIT
WAIT
SHOOT
Ăchec
Trouvé :
SHOOTEnd of line (\n)
Attendu :
Rien
I use the proposed output function:
{
echo("SHOOT\n");
} else {
echo("WAIT\n");
}
Thanks for your help
Maybe you printed an unexpected â\nâ (empty line after the last SHOOT)
Thanks, it was simply that