I have run test cases in a custom way . It works, but in case of verifying , it doesn't clear all test cases . Can anyone help me?
package com.codegym.task.task04.task0416;
/*
Crossing the road blindly
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner scanner = new Scanner(System.in);
float a = scanner.nextFloat() ;
a = f(a);
if (a>=0 && a<3){
System.out.println("green");
}
else if(a>=3 && a<4){
System.out.println("yellow");
}
else{
System.out.println("red");
}
}
public static float f(float x){
while (x>=5){
x=x/5;
}
return x;
}
}