Submission #172201


Source Code Expand

Copy
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int y = sc.nextInt();
        int m = sc.nextInt();
        final int d = sc.nextInt();
        if (m <= 2) {
            y -= 1;
            m += 12;
        }
        int from = 365 * y;
        from += Math.floorDiv(y, 4);
        from -= Math.floorDiv(y, 100);
        from += Math.floorDiv(y, 400);
        from += Math.floorDiv(306 * (m + 1), 10);
        from += d;
        from -= 429;
        final int to = 735369;
        System.out.println(to - from);
    }
}

Submission Info

Submission Time
Task A - 経過日数
User tksy
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 644 Byte
Status CE

Compile Error

./Main.java:16: error: cannot find symbol
        from += Math.floorDiv(y, 4);
                    ^
  symbol:   method floorDiv(int,int)
  location: class Math
./Main.java:17: error: cannot find symbol
        from -= Math.floorDiv(y, 100);
                    ^
  symbol:   method floorDiv(int,int)
  location: class Math
./Main.java:18: error: cannot find symbol
        from += Math.floorDiv(y, 400);
                    ^
  symbol:   method floorDiv(int,int)
  location: class Math
./Main.java:19: error: cannot find symbol
        from += Math.floorDiv(306 * (m + 1), 10);
                    ^
  symbol:   method floorDiv(int,int)
  location: class Math
4 errors