結果

問題 No.188 HAPPY DAY
ユーザー ねずねず
提出日時 2018-07-27 23:38:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 556 bytes
コンパイル時間 2,917 ms
コンパイル使用メモリ 70,984 KB
実行使用メモリ 51,260 KB
最終ジャッジ日時 2023-09-18 14:51:50
合計ジャッジ時間 2,485 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
51,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.time.*;

public class Main {
    public static void main(String[] args) throws Exception {
        int ans = 0;
        LocalDate start = LocalDate.of(2015, 1, 1);
        LocalDate end   = LocalDate.of(2016, 1, 1);
        
        while (start.isBefore(end)) {
            int m = start.getMonthValue();
            int d = start.getDayOfMonth();
            //System.out.println(m+"月"+d+"日");
            if (m == d / 10 + d % 10) ans++;
            start = start.plusDays(1);
        }
        
        System.out.println(ans);
    }
}
0