|
|
вернуться в форумwa #2 Hello! I have wa #2. But i don't undestand my mistake.can somebody help me? listnig is below import java.util.Scanner; public class q1607 { /** * @param args */ public static void main(String[] args) { Scanner in1 = new Scanner(System.in); int a=in1.nextInt(); int b=in1.nextInt(); int c=in1.nextInt(); int d=in1.nextInt(); a=a-b; c=c+d; while (a<=c-d) { a=a+b; if (a>=c-d) {break;} c=c-d; } System.out.println(a); } } |
|
|