結果

問題 No.87 Advent Calendar Problem
ユーザー リチウムリチウム
提出日時 2014-12-07 12:32:01
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 432 bytes
コンパイル時間 3,381 ms
コンパイル使用メモリ 72,284 KB
実行使用メモリ 59,380 KB
最終ジャッジ日時 2023-09-02 09:13:11
合計ジャッジ時間 8,935 ms
ジャッジサーバーID
(参考情報)
judge16 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 WA -
testcase_26 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import static java.lang.Math.*; 
public class ppp {
			
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  long n=sc.nextInt()-2014;
	  long amari=n-(n/400)*400;
	  long ans=57*((n-2014)/400);
	  for(int i=2015;i<=2014+amari;i++){
		  Calendar c = new GregorianCalendar(i, 7-1, 23);
		  if(c.get(Calendar.DAY_OF_WEEK)==4)ans++;
	  }
	  System.out.println(ans);
  }}
0