結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
n_gojo
|
| 提出日時 | 2020-04-09 11:06:58 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 1,000 ms |
| コード長 | 593 bytes |
| コンパイル時間 | 3,544 ms |
| コンパイル使用メモリ | 74,644 KB |
| 実行使用メモリ | 50,020 KB |
| 最終ジャッジ日時 | 2024-07-22 06:43:49 |
| 合計ジャッジ時間 | 3,584 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
import java.time.LocalDate;
import java.util.Scanner;
public class No188 {
public static void main(String[] args) {
LocalDate targetDate = LocalDate.of(2015, 1, 1);
LocalDate endDate = LocalDate.of(2016, 1, 1);
int ans = 0;
while (targetDate.isBefore(endDate)) {
int month = targetDate.getMonth().getValue();
int day = targetDate.getDayOfMonth();
if (month == (day/10 + day%10)) {
ans++;
}
targetDate = targetDate.plusDays(1);
}
System.out.println(ans);
}
}
n_gojo