I check my solution and it runs well in all the cases, but when i press 'verify' the program fails. Why?
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));
long t = (long) Double.parseDouble(reader.readLine());
String color = "";
if (t%4==0)
color = "red";
else if ((t+1)%4==0)
color = "yellow";
else
color = "green";
System.out.println(color);
}
}