結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-26 20:36:06 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 1,000 ms |
| コード長 | 649 bytes |
| 記録 | |
| コンパイル時間 | 2,518 ms |
| コンパイル使用メモリ | 80,760 KB |
| 実行使用メモリ | 39,680 KB |
| 最終ジャッジ日時 | 2026-06-04 17:01:55 |
| 合計ジャッジ時間 | 3,418 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}