TOPIC
5% WRONG ANSWER JAVA
EduardoMatheus asked 4 years ago
import java.math.BigInteger; import java.util.Scanner;
/*
-
@author Eduardo M */ public class Main {
public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger Ent; int Veri = 0;
while(sc.hasNext()) { Ent = sc.nextBigInteger(); if (Ent.mod(Ent.valueOf(4)).intValue() == 0 && Ent.mod(Ent.valueOf(100)).intValue() != 0 || Ent.mod(Ent.valueOf(400)).intValue() == 0) { System.out.print("This is leap year."); Veri = 1; } if (Ent.mod(Ent.valueOf(15)).intValue() == 0) { System.out.println("This is huluculu festival year."); Veri = 1; } if (Veri == 1) { if (Ent.mod(Ent.valueOf(55)).intValue() == 0) { System.out.println("This is bulukulu festival year."); Veri = 1; } } if (Veri == 0) { System.out.println("This is an ordinary year."); } Veri = 0; System.out.println(""); }
} }
/ I tried everything to solve the problem of the wrong answer (5%), plus all kinds of tests I do with the right answers, do not know what to do or what is wrong in the code. /