0
I pass all except the third parameter and don't know why, anyone please help..?
2 odpowiedzi
0
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int siblings = input.nextInt();
int popsicles = input.nextInt();
if(popsicles %siblings==0)
System.out.println("give away");
else
System.out.println("eat them yourself");
}
}
0
Read this line from that question:
"if you have enough left in the box to give them each an even amount you should go for it! If not, they will fight over them, and you should eat them yourself later"
But you are checking weather sibling and popsicles divide by 2 which doesn't give a valid answer . You should check if popsicles are successfully divide by the siblings .