結果

問題 No.188 HAPPY DAY
ユーザー nesaianesaia
提出日時 2017-04-17 16:20:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 457 bytes
コンパイル時間 3,158 ms
コンパイル使用メモリ 71,268 KB
実行使用メモリ 48,852 KB
最終ジャッジ日時 2023-08-29 22:30:22
合計ジャッジ時間 3,648 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

//No.188 HAPPY DAY
//http://yukicoder.me/problems/492
//20170417 1605

package no188;

public class No188 {
	public static void main(String[] args) {
		int happyCount;
		int[] monthMax = new int[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

		happyCount = 0;
		
		for(int i = 1; i <= 12; i++){
			for (int j = 1; j <= monthMax[i - 1]; j++) {
				if (i == j / 10 + j % 10) {
					happyCount++;
				}
			}
		}
		
		System.out.println(happyCount);
	}

}
0