в intellij idea работает
package com.javarush.task.task04.task0416;
import java.util.Scanner;
/*
Переходим дорогу вслепую
*/
public class Solution {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
while (t > 60) {
t-=60;
}
while (t > 5) {
t-=5;
}
if (t < 3) {
System.out.println("зелёный");
} else
if (t < 4) {
System.out.println("жёлтый");
} else
if (t < 5) {
System.out.println("красный");
}
}
}