結果

問題 No.188 HAPPY DAY
ユーザー jonki324jonki324
提出日時 2018-06-03 14:45:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 1,000 ms
コード長 562 bytes
コンパイル時間 4,040 ms
コンパイル使用メモリ 72,032 KB
実行使用メモリ 55,896 KB
最終ジャッジ日時 2023-09-12 21:52:00
合計ジャッジ時間 4,909 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.Scanner;
import java.time.LocalDate;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        LocalDate ld = LocalDate.of(2015, 01, 01);
        int cnt = 0;
        while (ld.getYear() == 2015) {
            int day = ld.getDayOfMonth();
            int a = day / 10;
            int b = day % 10;
            if (a + b == ld.getMonthValue()) {
                cnt++;
            }
            ld = ld.plusDays(1);
        }
        System.out.println(cnt);
        scan.close();
    }
}
0