結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-10-26 20:36:06 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 55 ms / 1,000 ms | 
| コード長 | 649 bytes | 
| コンパイル時間 | 3,577 ms | 
| コンパイル使用メモリ | 74,812 KB | 
| 実行使用メモリ | 50,164 KB | 
| 最終ジャッジ日時 | 2024-12-31 06:03:50 | 
| 合計ジャッジ時間 | 4,109 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
import java.time.LocalDate;
public class No188 {
    public static void main(String[] args) {
        LocalDate start = LocalDate.of(2015, 1, 1);
        LocalDate end = LocalDate.of(2015, 12, 31);
        int count = 0;
        for (LocalDate date = start; date.isBefore(end) || date.isEqual(end); date = date.plusDays(1)) {
            int month = date.getMonth().getValue();
            int day = date.getDayOfMonth();
            int firstDigit = day / 10;
            int secondDigit = day % 10;
            if (month == firstDigit + secondDigit) {
                count++;
            }
        }
        System.out.println(count);
    }
}
            
            
            
        