結果

問題 No.87 Advent Calendar Problem
ユーザー kano_townkano_town
提出日時 2014-12-07 02:20:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 2,031 ms
コンパイル使用メモリ 71,944 KB
実行使用メモリ 57,844 KB
最終ジャッジ日時 2023-09-02 09:12:12
合計ジャッジ時間 6,379 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,920 KB
testcase_01 AC 118 ms
55,684 KB
testcase_02 AC 123 ms
57,844 KB
testcase_03 AC 118 ms
55,816 KB
testcase_04 AC 120 ms
55,752 KB
testcase_05 WA -
testcase_06 AC 121 ms
56,140 KB
testcase_07 AC 117 ms
55,744 KB
testcase_08 AC 119 ms
56,204 KB
testcase_09 AC 123 ms
55,928 KB
testcase_10 AC 117 ms
55,820 KB
testcase_11 AC 119 ms
55,852 KB
testcase_12 WA -
testcase_13 AC 117 ms
56,076 KB
testcase_14 AC 120 ms
56,020 KB
testcase_15 AC 124 ms
56,360 KB
testcase_16 AC 118 ms
56,128 KB
testcase_17 AC 121 ms
55,684 KB
testcase_18 WA -
testcase_19 AC 118 ms
55,820 KB
testcase_20 AC 121 ms
56,112 KB
testcase_21 AC 123 ms
55,864 KB
testcase_22 AC 120 ms
56,104 KB
testcase_23 AC 125 ms
55,604 KB
testcase_24 AC 120 ms
55,916 KB
testcase_25 AC 118 ms
55,756 KB
testcase_26 AC 122 ms
56,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
	public static void main(String[] args) {
		long n=new Scanner(System.in).nextLong()-2014;
		long i,r=57*(n/400);
		for (i=15;i<n%400+14;i++)if((5*(i %100)/4+21*(i/100)/4)%7==3)r++;
		System.out.println(r);
	}
}
0