結果

問題 No.188 HAPPY DAY
ユーザー ぬるぬるぬるぬる
提出日時 2016-05-18 00:10:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 173 ms / 1,000 ms
コード長 586 bytes
コンパイル時間 4,446 ms
コンパイル使用メモリ 71,156 KB
実行使用メモリ 55,680 KB
最終ジャッジ日時 2023-08-29 05:33:53
合計ジャッジ時間 4,671 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 173 ms
55,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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;
	}
}
0