結果
問題 | No.87 Advent Calendar Problem |
ユーザー | t8m8⛄️ |
提出日時 | 2015-04-09 14:18:57 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,041 bytes |
コンパイル時間 | 3,559 ms |
コンパイル使用メモリ | 73,140 KB |
実行使用メモリ | 59,020 KB |
最終ジャッジ日時 | 2023-09-17 19:01:22 |
合計ジャッジ時間 | 10,662 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 211 ms
56,468 KB |
testcase_01 | AC | 211 ms
57,000 KB |
testcase_02 | WA | - |
testcase_03 | AC | 200 ms
58,896 KB |
testcase_04 | AC | 204 ms
56,668 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 211 ms
56,572 KB |
testcase_08 | WA | - |
testcase_09 | AC | 198 ms
56,384 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 207 ms
56,780 KB |
testcase_13 | WA | - |
testcase_14 | AC | 211 ms
56,936 KB |
testcase_15 | WA | - |
testcase_16 | AC | 207 ms
56,724 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 200 ms
56,900 KB |
testcase_21 | WA | - |
testcase_22 | AC | 198 ms
56,952 KB |
testcase_23 | AC | 208 ms
56,432 KB |
testcase_24 | AC | 197 ms
56,604 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
ソースコード
//No.87 Advent Calendar Problem import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No87 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { long n = in.nextLong()-2014; Calendar c = Calendar.getInstance(); c.set(2014,7,23); int w = c.get(Calendar.DAY_OF_WEEK); long cnt = n/400*57; n %= 400; for (int i=0; i<=n; i++) { c.add(Calendar.DAY_OF_YEAR,1); if (w == c.get(Calendar.DAY_OF_WEEK)) cnt++; } out.println(cnt); } public static void main(String[] args) { long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); //trace(end-start + "ms"); in.close(); out.close(); } static void trace(Object... o) { System.out.println(deepToString(o));} }