Помогите, пожалуйста, разобраться, почему программа не работает адекватно согласно условию задачи. Спасибо! public class Solution { public static volatile int numSeconds = 3; public static void main(String[] args) throws InterruptedException { RacingClock clock = new RacingClock(); Thread.sleep(numSeconds); clock.interrupt();//add your code here - добавь код тут } public static class RacingClock extends Thread { private double seconds; public RacingClock() { start(); } public void run() { StringBuilder builder = new StringBuilder(); Thread current = Thread.currentThread(); while (!current.isInterrupted()) { try { Thread.sleep(500); } catch (InterruptedException e) { if (seconds < 3.5) { for (int i = (int) seconds; i > 0; i--) { builder.append(i + " "); } builder.append("Марш!"); System.out.println(builder.toString()); } else { for (int i = (int) seconds; i > 0; i--) { builder.append(i + " "); } builder.append("Прервано!"); System.out.println(builder.toString()); } current.interrupt(); } seconds = seconds + 0.5; } //add your code here - добавь код тут } } }