Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Solution
- {
- public static void main(String[] args) throws Exception
- {
- int x;
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- String s = reader.readLine();
- int i = Integer.parseInt(s);
- if (i%400 == 0 || i%4 == 0 && i%100 != 0){
- x = 366;
- System.out.println("Количество дней в году: " + x);
- } else {
- x = 365;
- System.out.println("Количество дней в году: " + x);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement