結果

問題 No.87 Advent Calendar Problem
ユーザー kano_town
提出日時 2014-12-07 01:14:55
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 406 bytes
コンパイル時間 1,766 ms
コンパイル使用メモリ 73,732 KB
実行使用メモリ 60,204 KB
最終ジャッジ日時 2024-06-11 15:59:54
合計ジャッジ時間 8,465 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other RE * 2 TLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int res = 0;
		// ツェラーの公式
		for (int i = 2015; i <= N; i++)
			if ((23 + (int) (26 * 8 / 10) + (i % 100) + (int) ((i % 100) / 4) + 5 * (int) (i / 100) + (int) (i / 100) / 4) % 7 == 4) res++;
		System.out.println(res);
	}
}
0