結果

問題 No.87 Advent Calendar Problem
ユーザー kano_townkano_town
提出日時 2014-12-07 01:55:24
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 359 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 72,368 KB
実行使用メモリ 56,520 KB
最終ジャッジ日時 2023-09-02 09:11:29
合計ジャッジ時間 6,409 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 119 ms
55,980 KB
testcase_04 AC 121 ms
56,260 KB
testcase_05 AC 124 ms
56,048 KB
testcase_06 AC 120 ms
55,752 KB
testcase_07 AC 121 ms
56,020 KB
testcase_08 AC 120 ms
55,808 KB
testcase_09 WA -
testcase_10 AC 122 ms
55,808 KB
testcase_11 AC 121 ms
55,816 KB
testcase_12 AC 125 ms
55,964 KB
testcase_13 AC 121 ms
55,916 KB
testcase_14 AC 121 ms
55,780 KB
testcase_15 AC 122 ms
55,880 KB
testcase_16 AC 123 ms
56,352 KB
testcase_17 AC 120 ms
55,660 KB
testcase_18 AC 124 ms
55,748 KB
testcase_19 AC 124 ms
55,840 KB
testcase_20 AC 123 ms
55,932 KB
testcase_21 AC 123 ms
55,880 KB
testcase_22 AC 124 ms
55,796 KB
testcase_23 AC 118 ms
56,188 KB
testcase_24 AC 118 ms
55,928 KB
testcase_25 AC 124 ms
55,992 KB
testcase_26 AC 118 ms
55,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong() - 2014;
		long res = 57 * (N / 400);
		// Zeller
		for (long i = 2015; i <= N % 400 + 2015; i++) if ((39 + 5 * (i % 100) / 4 + 21 * (i / 100) / 4) % 7 == 0) res++;
		System.out.println(res);
	}
}
0