Please refer line number 16 tried with real numbers 1.5 and 2.5.
It is working with 2.5 and hope if I do so it will work for rest But its a Big O(n) type approach its not so good please help
package com.codegym.task.task04.task0416;
/*
Crossing the road blindly
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String time = reader.readLine();
Double t = Double.parseDouble(time);
if(t==1||t==1.5||t==2||t==2.5||t==3||t==6||t==7||t==8||t==11||t==12||t==13||t==16||t==17||t==18||t==21||t==22||t==23||t==26||t==27||t==28||t==31||t==32||t==33||t==36||t==37||t==38||t==41||t==42||t==43||t==46||t==47||t==48||t==51||t==52||t==53||t==56||t==57||t==58)
System.out.println("Green");
if (t==4||t==9||t==14||t==19||t==24||t==29||t==34||t==39||t==44||t==49||t==54||t==59)
System.out.println("Yellow");
if (t==5||t==10||t==15||t==20||t==25||t==30||t==35||t==40||t==45||t==50||t==55||t==60)
System.out.println("Red");
}
}