結果
| 問題 |
No.188 HAPPY DAY
|
| コンテスト | |
| ユーザー |
kurobei72
|
| 提出日時 | 2018-01-18 21:11:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 198 ms / 1,000 ms |
| コード長 | 910 bytes |
| コンパイル時間 | 2,569 ms |
| コンパイル使用メモリ | 74,588 KB |
| 実行使用メモリ | 54,440 KB |
| 最終ジャッジ日時 | 2024-12-31 06:48:49 |
| 合計ジャッジ時間 | 3,481 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
import java.util.GregorianCalendar;
public class Main {
public static void main(String[] args) throws Exception {
// Scanner sc = new Scanner(System.in);
//int a = sc.nextInt();
//int b = sc.nextInt();
GregorianCalendar calendar = new GregorianCalendar(2015, 0, 31);
GregorianCalendar endDay = new GregorianCalendar(2015, 11, 31);
int count = 0;
int d10 = 0;
int d1 = 0;
for (int i = 1; i <= 365; i++ ) {
int m = calendar.get(calendar.MONTH);
int d = calendar.get(calendar.DATE);
if (d > 9) {
d10 = d/10;
d1 = d%10;
} else {
d1 = d;
}
if (m == d10 + d1) {
count++;
}
calendar.add(calendar.DATE, 1);
}
System.out.println(count);
}
}
kurobei72