結果

問題 No.188 HAPPY DAY
ユーザー nesaia
提出日時 2017-04-17 16:20:09
言語 Java
(openjdk 23)
結果
AC  
実行時間 50 ms / 1,000 ms
コード長 457 bytes
コンパイル時間 3,243 ms
コンパイル使用メモリ 74,112 KB
実行使用メモリ 49,904 KB
最終ジャッジ日時 2024-12-31 01:31:36
合計ジャッジ時間 3,390 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

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