結果
問題 | No.188 HAPPY DAY |
ユーザー |
![]() |
提出日時 | 2016-05-18 00:10:47 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 211 ms / 1,000 ms |
コード長 | 586 bytes |
コンパイル時間 | 4,259 ms |
コンパイル使用メモリ | 73,828 KB |
実行使用メモリ | 41,584 KB |
最終ジャッジ日時 | 2024-12-30 21:36:06 |
合計ジャッジ時間 | 5,547 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
import java.util.Calendar;public class CalendarTest {private static int count=0;public static void main(String[] args) {for(int i=0; i<12; i++){Calendar theDay = Calendar.getInstance();theDay.set(2015, i,1);int maxDate = theDay.getActualMaximum(Calendar.DATE);check(i,maxDate);}System.out.println(count);}private static int check(int month, int lastday){int OneDigit = 0;int TwoDigit = 0;for(int i=1;i<=lastday;i++){OneDigit = i % 10;TwoDigit = i / 10;if ( month + 1 == OneDigit + TwoDigit){count++;}}return 1;}}